LPC54102 power library --ropi

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC54102 power library --ropi

跳至解决方案
1,169 次查看
cameron_j_moore
Contributor I

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.

标签 (1)
1 解答
977 次查看
jeremyzhou
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
977 次查看
cameron_j_moore
Contributor I

I should mention I'm using Keil uVision 5. 

0 项奖励
978 次查看
jeremyzhou
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------