-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rp2040 UF2 file works well. But .elf or .hex is not working #7
Comments
This project includes a boot sector that needs to have a valid CRC included. You have two options:
|
Dear Alex,
Thank you for the quick response. I downloaded the utility and done 'Make' of bin2uf2.c and got the bin2uf2.exe
Followed by, I used the command
.\bin2uf2 -i D:\TestProject\rp2040\bin2uf2\Demo.bin -o Demo1.uf2 -u
I printed the CRC value and converted it to hex LONG(0x88769055). Copied the value into rp2040.ld
Even then, the elf file is not getting executed. Whereas the UF2 file works well.
Regards,
Vinoth M.
…________________________________
From: Alex Taradov ***@***.***>
Sent: 29 July 2023 20:03
To: ataradov/mcu-starter-projects ***@***.***>
Cc: Vinoth Magadevan ***@***.***>; Author ***@***.***>
Subject: Re: [ataradov/mcu-starter-projects] rp2040 UF2 file works well. But .elf or .hex is not working (Issue #7)
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
This project includes a boot sector that needs to have a valid CRC included. You have two options:
1. Program a BIN file passed though this utility https://github.com/ataradov/tools/tree/master/bin2uf2
2. Do this once and see what CRC is generated for your compiler setup and edit rp2040.ld and change the value in "LONG(0xcccccccc)" to a real CRC value. After that all ELF file will include a valid CRC. At least until you change the compiler version and it generates a different code.
—
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BBS6OSC3P57SCLPYFOQJ4VDXSUNKFANCNFSM6AAAAAA24POM3U>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
With "-u" option it would generate raw binary file, not UF2 file, so I'm not sure how it works for you. Can you attach your binary file so I can check it on my side? |
i have weact rp2040 with 16mb flash. The blink Demo.uf2 works. |
How do you initialize the ADC module? They say disable digital functions and make pin input. Is my code right? `HAL_GPIO_PIN(ch0, 0, 26, null) ; //pin name, port, Gpio26, function ADC) void init_ADC(void) {
} |
I think digital functions are disabled by default on the ADC pins anyway, so just don't do anything. Also, _pulldown() enables pull-down. There is currently no function to disable both, so don't enable any of them For the ADC itself - I have no idea, never used it. But your two writes to CS are clearly not correct. The second write will overwrite the EN write. |
i will try later and report. Thank you |
Demo.UF2 is executing without any issues.
But when I use Demo.elf, the program is not executing.
I am able to load blink.elf(blink program from PICO SDK 1.5.0) successfully using picoprobe to target rp2040
The text was updated successfully, but these errors were encountered: