LPC54102 power library --ropi

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC54102 power library --ropi

ソリューションへジャンプ
1,190件の閲覧回数
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 解決策
998件の閲覧回数
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 返答(返信)
998件の閲覧回数
cameron_j_moore
Contributor I

I should mention I'm using Keil uVision 5. 

0 件の賞賛
999件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------