I'm trying to compile and link with -ropi against a sample project. If I initialize the board (LPCxpresso 54102) in the bootloader and jump to the relocatable code everything is fine, but trying to link the necessary startup items (Board_SystemInit which eventually calls the power_library) fails miserably. I really don't understand why.
Specifically I'm just trying to make the following work:
AREA HANDLER, CODE, READONLY
IMPORT SystemInit ; this fails for unknown reasons
IMPORT __main ; this works fine...
main_entry DCD __main + 2 - .
sys_entry DCD SystemInit + 6 - .
The Link Errors I'm getting because of the IMPORT SystemInit line are:
.\Objects\pic.axf: Error: L6248E: power_library.o(i.__set_voltage) in PI region 'ER_IROM1' cannot have address type relocation to [Anonymous Symbol] in PI region 'ER_IROM1'.
.\Objects\pic.axf: Error: L6285E: Non-relocatable Load region LR_IROM1 contains R-Type dynamic relocations. First R-Type dynamic relocation found in power_library.o(i.__set_voltage) at offset 0x1230.
And since the power library is closed source, it's difficult to figure out what I need to do. This should be possible, I just need more insight. Thanks.
Solved! Go to Solution.
Hi Cameron Moore,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
If you want to load the power lib in your project, I'd like to point you to refer to the power_manager_lpc demo in the LPC54102's SDK library, please give a try.
SDK library: MCUXpresso SDK|NXP
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I should mention I'm using Keil uVision 5.
Hi Cameron Moore,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
If you want to load the power lib in your project, I'd like to point you to refer to the power_manager_lpc demo in the LPC54102's SDK library, please give a try.
SDK library: MCUXpresso SDK|NXP
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------