-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Adding a -DRP2350 causes this error src/rp2_common/pico_crt0/embedded_start_block.inc.S:51: Error: invalid operands (*UND* and *ABS* sections) for `<<' #1974
Comments
That might break e.g. https://github.com/raspberrypi/pico-sdk/blob/develop/src/rp2_common/pico_crt0/embedded_start_block.inc.S#L54 ?
I think the expectation is that you'd pass |
His fix is because of that line |
embedded_start_block.inc.S uses the following line 54: PICOBIN_IMAGE_TYPE_EXE_CHIP_AS_BITS(RP2350) | \ For a RP2040 project and an addition of a compile definition of -DRP2040, the project compiles okay (Silently wrong) For a RP2350 project and an addition of a compile definition of -DRP2350, the project fails and uncovers a problem which I didn't know was there. PICOBIN_IMAGE_TYPE_EXE_CHIP_AS_BITS(RP2350) |
Ahhh, I've just found https://github.com/raspberrypi/pico-sdk/blob/develop/src/common/boot_picobin_headers/include/boot/picobin.h which explains everything... (I should have done more research before posting my previous comment, sorry!) #define PICOBIN_INDEX_TO_BITS(y, x) (y ## _ ## x << y ## _LSB)
#define PICOBIN_IMAGE_TYPE_EXE_CHIP_LSB _u(12)
#define PICOBIN_IMAGE_TYPE_EXE_CHIP_BITS _u(0x7000)
#define PICOBIN_IMAGE_TYPE_EXE_CHIP_RP2040 _u(0)
#define PICOBIN_IMAGE_TYPE_EXE_CHIP_RP2350 _u(1)
#define PICOBIN_IMAGE_TYPE_EXE_CHIP_AS_BITS(x) PICOBIN_INDEX_TO_BITS(PICOBIN_IMAGE_TYPE_EXE_CHIP, x) I believe this means that (in the case where you haven't done Whereas if you have done Yes, this doesn't address your original problem; I'm just providing extra background-info in case it's useful. |
merged into develop |
Simply adding a compile time definition -DRP2350 to a pico2 CMake project and compiling the crt0.S with the GNU assembler causes the following error from the included file embedded_start_block.inc.S
"pico-sdk/src/rp2_common/pico_crt0/embedded_start_block.inc.S:51: Error: invalid operands (UND and ABS sections) for `<<'"
A simple #undef RP2350 placed at the beginning of "embedded_start_block.inc.S" allows it to compile/assemble properly
The text was updated successfully, but these errors were encountered: