AnsweredAssumed Answered

MPC5744P Dev fails to launch App after reset if >64K

Question asked by Stuart Jobbins on Aug 3, 2019
Latest reply on Sep 6, 2019 by Marius-lucian Andrei

NXP MBDT runs perfectly on MPC5744P and runs motor using MotorGD board until....

 

... I expand the application code such that the Flash segment runs beyond 0xFFFFH (i.e. from 0x01000000 to above 0x01010000).... and at that point it fails to come out of reset to start application. Reduce it below the magic 0x1010000H(such that .appKey resides in the first 64K) and it all works... highly repeatable.. and doesn't care which code I include/exclude to get the effect.

 

The MOT file appears correct, and includes all the Bootloader requirements of RCHW, address of application start, timeout value, address of appkey.... all pointing to the correct addresses and the appkey is clearly present at the right address in the .Mot S-records.

 

I can't see any 'memory size' model style restrictions in the build (running the automatic S32DS and RAppID elements, or standalone build and programming tools).. also tried changing the Default Target Memory Definition in Matlab - same result (works OK when smaller than 64K flash, not when above). RAppID reports correct size (from S-records) in each case.

 

Have I missed something that needs to be set to allow me to 'grow' the code size? (I have lots more to implement - but don't expect final size to be >128K of Flash).

 

App RAM usage is trivial at >16K (at Location 0x40000000 up) . Stacks and Heap etc are at 0x50800000 and are unchanged .. approx allocated 0x1000 each)

 

Failure example

 

S0130000534A5F4D435F4D6F64656C332E6D6F745F
S30900FA0000005A0001A1
S30900FA000401000000F7
S30900FA0008004C4B401D
S30900FA000C0101009C52
S315010000007C00014670000000702000007040000076

...

S31101010090BE2AA7C000000000800000008D
S3090101009C55AA55AA5A
S315010100A0011B033B0000001800000002FFFF2E9018
S311010100B000000030FFFF3E98000000A494

...

S315010113B802625A000100E9900100E9A80100E9F079
S315010113C80100EA080100E9C00100E9D8340000007A
S70501000000F9

 

Success Example (same build some content commented out before recompiling)

S0130000534A5F4D435F4D6F64656C332E6D6F745F
S30900FA0000005A0001A1
S30900FA000401000000F7
S30900FA0008004C4B401D
S30900FA000C0100FEAC45
S315010000007C00014670000000702000007040000076

...

S3110100FEA0BE2AA7C0000000008000000080
S3090100FEAC55AA55AA4D
S3150100FEB0011B033B0000001800000002FFFF308019
S3110100FEC000000030FFFF4088000000A495

...

S315010111C802625A000100E7980100E7B00100E7F859
S315010111D80100E8100100E7C80100E7E0340000005A
S70501000000F9

Outcomes