MP5748G EVB board - flash to run program without debugger

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

MP5748G EVB board - flash to run program without debugger

1,423件の閲覧回数
karma_JC
Contributor I

Hi:

I created a simple application to blink a user LED on MPC5748G EVB.  In debug mode, I can run it as expected; user LED is bilking.  However, when I create a "Release" of same program and flashed it( remove all the debug info), the program does not seems to working at all; the user LED is not blinking.

I checked community How-to section.  There has instruction to flash for debugging.  Do you have procedure to run the program after flashing the "RELEASE" code?

I have attached the test project which I'm playing around.

Thanks

James

0 件の賞賛
返信
5 返答(返信)

1,319件の閲覧回数
Ada_Lovelace
Contributor IV

Hi,

have you solved this problem? Now I have the same problem as you. How do you do it? Can you give me some guidance? thank you

0 件の賞賛
返信

1,305件の閲覧回数
karma_JC
Contributor I

Hi Ada_Lovelace:

Not yet... I'm looking into boot process right now.  From my understanding, there is a boot-header needed to be placed in following location in flash:

karma_JC_0-1651158913138.png

By default project setting, the link script is placing boot-header in 0x00FA0000 which it is 9th in search order.  If you check sample boot loader, the boot loader is placed at 0x00FC0000; 2nd in search order.  I don't think  0x00F80000(1st in search order) being a good place for project boot header because it might have for HSM.  So, I change my project setting for boot-header to 0x00FC0000.

However, I found a possible issue by "Disassembler".  The CPU0 reset vector seems to pointing 1 word(4 bytes) OFF from where a instruction would "jump" to the "main".  So, I'm trying to look for help on this.  If anybody know how to get around this issue and know what's reason why CPU0 reset vector being pointing 1 work off from the instruction , that will be great. 

Currently, I'm looking where and how CPU0 reset vector being set and see how to modify it.  Hopefully, that is right direction to go.

Thanks

James

0 件の賞賛
返信

1,289件の閲覧回数
Ada_Lovelace
Contributor IV

Hi  James:

I am using mpc5748g. When I brush the bootloader, I connect PE and can brush repeatedly in the debug mode. When I unplug the debugger and power on the board again, I can't brush again. Therefore, I designed a test io. When I connect the debugger, IO is 3.5V. When I unplug the debugger and power on the board again, IO has no power. At present, I haven't found the reason. My starting address is the default address 0x00fa0000,

Ada_Lovelace_0-1651200369750.png

 

Here is my test code

0 件の賞賛
返信

1,276件の閲覧回数
karma_JC
Contributor I

Actually, I'm using MPC5748G LCEVB, with PE JTAG.  My testing is just blinking an user LED light on the board.  Also, I user "hello world" example(LED blinking as well) for testing on boot-header address at 0x00FC000 and 0x00FA0000.  Both setup were not able to get the application started after power cycling.  I did a memory dump(instead of disassembler) on boot-header contain CPU0 reset vector to 0x01000000 which correct location to "_start". So, it is not vector issue.  So, what is the triggering to run our own application?

Perhaps, it needs a boot-loader?.?.?. 

0 件の賞賛
返信

1,365件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi James,

I found out that there's no definition of TURN_ON_CPU0 in Assembler settings. So, there was no valid RCHW in the release project. If I added the definition like this, it works:

lukaszadrapa_1-1650433361709.png

 

And one more thing - I can see that vTickDelay uses just a simple while loop. If the optimization level is configured as -O1, it's optimized out, so the LED toggles too fast without delay. If I used optimization level -O0, it's not optimized out and the LED is toggling with delay as expected.

Hope this helps.

Regards,

Lukas

0 件の賞賛
返信