Booting R52_0 from QSPI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Booting R52_0 from QSPI

495 Views
HiddenSquid
Contributor III

Hello,

I am using the S32E288-975EVB and I am trying to use the R52_0 core as the boot core and run my application code from QSPI flash.

I could successfully boot my application code from flash with the M33 SMU core using the IVT tool. When I try to use the raw binary as my Application Bootloader in the R52_0 project IVT tool, I get the error "The size of the selected binary is greater than the maximum RAM size". The problem is most likely not the size, as I can successfully launch my code with the S32 Debug Probe and the code itself is a trivial LED blink.

I can also see that the binary is mostly empty in the beginning. There is some data at 0x0 - 0x20 and then it is just zeros until 0x0098_0000, which makes sense, because I can see from my linker file that DRAM starts at 0x3178_0000 and CRAM start at 0x3210_0000 (0x3210_0000  - 0x3178_0000  = 0x0098_0000):

/*
* Target device: This linker is demo and it is using for device S32Z2xx and S32E2xx only
* Target core: This linker target application which is running on RTU0 clusters for both split-lock and lockstep mode.
* Linker support for application running on single/multicore within RTU0 cluster by single image file. It need to align with MPU default setup in core.c as well.
* Memory setting: Local ram of RTU0 (CRAM and DRAM)
*/

/*
* GCC Linker Command File:
* 0x30000000    0x3000FFFF  65536    ; RTU0_R52_0_TCM_A
* 0x30100000    0x30103FFF  16384    ; RTU0_R52_0_TCM_B
* 0x30200000    0x30203FFF  16384    ; RTU0_R52_0_TCM_C
* 0x30400000    0x3040FFFF  65536    ; RTU0_R52_1_TCM_A
* 0x30500000    0x30503FFF  16384    ; RTU0_R52_1_TCM_B
* 0x30600000    0x30603FFF  16384    ; RTU0_R52_1_TCM_C
* 0x30800000    0x3080FFFF  65536    ; RTU0_R52_2_TCM_A
* 0x30900000    0x30903FFF  16384    ; RTU0_R52_2_TCM_B
* 0x30A00000    0x30A03FFF  16384    ; RTU0_R52_2_TCM_C
* 0x30C00000    0x30C0FFFF  65536    ; RTU0_R52_3_TCM_A
* 0x30D00000    0x30D03FFF  16384    ; RTU0_R52_3_TCM_B
* 0x30E00000    0x30E03FFF  16384    ; RTU0_R52_3_TCM_C
* 0x31780000    0x317C0000  262144   ; RTU0_DRAM_0 (Fast Data 0)
* 0x317C0000    0x31800000  262144   ; RTU0_DRAM_1 (Fast Data 1)
* 0x31800000    0x31880000  524288   ; RTU0_DRAM_2 (Fast Data 2)
* 0x32100000    0x321FFFFF  1048575  ; RTU0_CRAM_0 (Code ram 0)
* 0x32200000    0x322FFFFF  1048575  ; RTU0_CRAM_1 (Code ram 1)
* 0x32300000    0x323FFFFF  1048575  ; RTU0_CRAM_2 (Code ram 2)
* 0x32400000    0x324FFFFF  1048575  ; RTU0_CRAM_3 (Code ram 3)
* 0x32500000    0x325FFFFF  1048575  ; RTU0_CRAM_4 (Code ram 4)
* 0x32600000    0x326FFFFF  1048575  ; RTU0_CRAM_5 (Code ram 5)
* 0x32700000    0x327FFFFF  1048575  ; RTU0_CRAM_6 (Code ram 6)
* 0x79900000    0x799FFFFF  1048575  ; RTU0_CRAM_0_AXIF (Code ram 0 AXIF)
* 0x79A00000    0x79AFFFFF  1048575  ; RTU0_CRAM_1_AXIF (Code ram 1 AXIF)
* 0x79B00000    0x79BFFFFF  1048575  ; RTU0_CRAM_2_AXIF (Code ram 2 AXIF)
* 0x79C00000    0x79CFFFFF  1048575  ; RTU0_CRAM_3_AXIF (Code ram 3 AXIF)
* 0x79D00000    0x79DFFFFF  1048575  ; RTU0_CRAM_4_AXIF (Code ram 4 AXIF)
* 0x79E00000    0x79EFFFFF  1048575  ; RTU0_CRAM_5_AXIF (Code ram 5 AXIF)
* 0x79F00000    0x79FFFFFF  1048575  ; RTU0_CRAM_6_AXIF (Code ram 6 AXIF)
* 0x4E400000    0x4E400FFF  4096     ; AE_SRAM
*/

 

I have also tried to use the .elf format as the application bootloader in the IVT tool as I understand it basically helps reduce the unused space by defining RAM start sections with length and should reduce the amount of unused space in the binary, but I could not get it working as intended.

Now I have three main issues:

  1. Can I use the raw binary version for my application bootloader in the IVT TOOL or can the bootROM also interpret the .elf format correctly?
    If I can not use the .elf format, then how can I make my raw binary usable?
  2. When I am trying to boot from the R52_0 core, what should I set as RAM ENTRY pointer. The datasheet states "If Boot Target is 1, the allowed SRAM range for application download is in the RTU0 Code RAM region in the address range 3210_0000h to 327F_FFFFh.", so it has to be something in this range, but should it be set to Reset_Handler, ETABLE or VTABLE or something else entirely? For the M33 SMU core I had to set it as the start of VTABLE and then the VTABLE would point to Reset_Handler, but how does it work for the R cores?
  3. I feel like I have some mismatch of addresses. For example, I can see from the map file, that my exception vector table should be at 0x3210_0360:
*(.extable)
 .extable       0x32100340       0x20 ./Project_Settings/Startup_Code/Vector_Table.o
                0x32100340                ETABLE
                0x32100360                . = ALIGN (0x4)
                0x32100360                __exceptions_ram_end = .
                0x32100360                __interrupts_ram_start = .
 *(.intc_vector)
 .intc_vector   0x32100360      0xf04 ./Project_Settings/Startup_Code/Vector_Table.o
                0x32100360                DEFAULT_VECTOR
                0x32101264                . = ALIGN (0x4)
                0x32101264                __interrupts_ram_end = .
                0x32101264                . = ALIGN (0x4)
 *(.startup)
                0x32101264                . = ALIGN (0x4)

Since I don't have any interrupts defined it makes sense that every entry will point to undefined_handler, which I should be able to see from my raw_binary: image.png
But undefined_handler address is set at 0x3210_14d0 in the map file:

                0x321014ce                HVC_Handler
                0x321014d0                undefined_handler
 *fill*         0x321014d2        0x2 
 .systeminit    0x321014d4      0x124 ./Project_Settings/Startup_Code/system.o


Will it be a problem or is that off by one error somehow accounted for somewhere else?

0 Kudos
Reply
3 Replies

389 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

Could you post your case to this link: https://support.nxp.com   ?

Then, Copy this link and @Joey in the support system. It is more convinced to share information about Booting R52_0 from QSPI with you.

BR

Joey

 

0 Kudos
Reply

393 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

I can also see that the binary is mostly empty in the beginning. There is some data at 0x0 - 0x20 and then it is just zeros until 0x0098_0000, which makes sense, because I can see from my linker file that DRAM starts at 0x3178_0000 and CRAM start at 0x3210_0000 (0x3210_0000  - 0x3178_0000  = 0x0098_0000)

>>>For the RTD R52 example project, the size of the compiled bin file is close to 8MB, which is too large. The reason is that the linker file defines the Code RAM as starting from 0x32100000 (RTU0_CRAM_0), and the Data RAM as starting from 0x31780000 (RTU0_DRAM_0), and the compiler will automatically fill in invalid data in these address range to keep the binary content continuous.

In order to reduce the size of the compiled binary, you need to modify the linker script as well as the startup code to relocate Data RAM in RTU0_CRAM so that the binary will not have a large address gap with invalid data filling. 

BR

Joey

0 Kudos
Reply

403 Views
Joey_z
NXP Employee
NXP Employee

Hi,HiddenSquid

Thank you for contacting us.

I have received your question and will help you to check it.

BR

Joey

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2335248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBooting%20R52_0%20from%20QSPI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2335248%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20S32E288-975EVB%20and%20I%20am%20trying%20to%20use%20the%20R52_0%20core%20as%20the%20boot%20core%20and%20run%20my%20application%20code%20from%20QSPI%20flash.%3C%2FP%3E%3CP%3EI%20could%20successfully%20boot%20my%20application%20code%20from%20flash%20with%20the%20M33%20SMU%20core%20using%20the%20IVT%20tool.%20When%20I%20try%20to%20use%20the%20raw%20binary%20as%20my%20Application%20Bootloader%20in%20the%20R52_0%20project%20IVT%20tool%2C%20I%20get%20the%20error%20%22The%20size%20of%20the%20selected%20binary%20is%20greater%20than%20the%20maximum%20RAM%20size%22.%20The%20problem%20is%20most%20likely%20not%20the%20size%2C%20as%20I%20can%20successfully%20launch%20my%20code%20with%20the%20S32%20Debug%20Probe%20and%20the%20code%20itself%20is%20a%20trivial%20LED%20blink.%3C%2FP%3E%3CP%3EI%20can%20also%20see%20that%20the%20binary%20is%20mostly%20empty%20in%20the%20beginning.%20There%20is%20some%20data%20at%200x0%20-%200x20%20and%20then%20it%20is%20just%20zeros%20until%200x0098_0000%2C%20which%20makes%20sense%2C%20because%20I%20can%20see%20from%20my%20linker%20file%20that%20DRAM%20starts%20at%200x3178_0000%20and%20CRAM%20start%20at%200x3210_0000%20(0x3210_0000%26nbsp%3B%20-%200x3178_0000%26nbsp%3B%20%3D%200x0098_0000)%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%2F*%0A*%20Target%20device%3A%20This%20linker%20is%20demo%20and%20it%20is%20using%20for%20device%20S32Z2xx%20and%20S32E2xx%20only%0A*%20Target%20core%3A%20This%20linker%20target%20application%20which%20is%20running%20on%20RTU0%20clusters%20for%20both%20split-lock%20and%20lockstep%20mode.%0A*%20Linker%20support%20for%20application%20running%20on%20single%2Fmulticore%20within%20RTU0%20cluster%20by%20single%20image%20file.%20It%20need%20to%20align%20with%20MPU%20default%20setup%20in%20core.c%20as%20well.%0A*%20Memory%20setting%3A%20Local%20ram%20of%20RTU0%20(CRAM%20and%20DRAM)%0A*%2F%0A%0A%2F*%0A*%20GCC%20Linker%20Command%20File%3A%0A*%200x30000000%20%20%20%200x3000FFFF%20%2065536%20%20%20%20%3B%20RTU0_R52_0_TCM_A%0A*%200x30100000%20%20%20%200x30103FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_0_TCM_B%0A*%200x30200000%20%20%20%200x30203FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_0_TCM_C%0A*%200x30400000%20%20%20%200x3040FFFF%20%2065536%20%20%20%20%3B%20RTU0_R52_1_TCM_A%0A*%200x30500000%20%20%20%200x30503FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_1_TCM_B%0A*%200x30600000%20%20%20%200x30603FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_1_TCM_C%0A*%200x30800000%20%20%20%200x3080FFFF%20%2065536%20%20%20%20%3B%20RTU0_R52_2_TCM_A%0A*%200x30900000%20%20%20%200x30903FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_2_TCM_B%0A*%200x30A00000%20%20%20%200x30A03FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_2_TCM_C%0A*%200x30C00000%20%20%20%200x30C0FFFF%20%2065536%20%20%20%20%3B%20RTU0_R52_3_TCM_A%0A*%200x30D00000%20%20%20%200x30D03FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_3_TCM_B%0A*%200x30E00000%20%20%20%200x30E03FFF%20%2016384%20%20%20%20%3B%20RTU0_R52_3_TCM_C%0A*%200x31780000%20%20%20%200x317C0000%20%20262144%20%20%20%3B%20RTU0_DRAM_0%20(Fast%20Data%200)%0A*%200x317C0000%20%20%20%200x31800000%20%20262144%20%20%20%3B%20RTU0_DRAM_1%20(Fast%20Data%201)%0A*%200x31800000%20%20%20%200x31880000%20%20524288%20%20%20%3B%20RTU0_DRAM_2%20(Fast%20Data%202)%0A*%200x32100000%20%20%20%200x321FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_0%20(Code%20ram%200)%0A*%200x32200000%20%20%20%200x322FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_1%20(Code%20ram%201)%0A*%200x32300000%20%20%20%200x323FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_2%20(Code%20ram%202)%0A*%200x32400000%20%20%20%200x324FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_3%20(Code%20ram%203)%0A*%200x32500000%20%20%20%200x325FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_4%20(Code%20ram%204)%0A*%200x32600000%20%20%20%200x326FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_5%20(Code%20ram%205)%0A*%200x32700000%20%20%20%200x327FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_6%20(Code%20ram%206)%0A*%200x79900000%20%20%20%200x799FFFFF%20%201048575%20%20%3B%20RTU0_CRAM_0_AXIF%20(Code%20ram%200%20AXIF)%0A*%200x79A00000%20%20%20%200x79AFFFFF%20%201048575%20%20%3B%20RTU0_CRAM_1_AXIF%20(Code%20ram%201%20AXIF)%0A*%200x79B00000%20%20%20%200x79BFFFFF%20%201048575%20%20%3B%20RTU0_CRAM_2_AXIF%20(Code%20ram%202%20AXIF)%0A*%200x79C00000%20%20%20%200x79CFFFFF%20%201048575%20%20%3B%20RTU0_CRAM_3_AXIF%20(Code%20ram%203%20AXIF)%0A*%200x79D00000%20%20%20%200x79DFFFFF%20%201048575%20%20%3B%20RTU0_CRAM_4_AXIF%20(Code%20ram%204%20AXIF)%0A*%200x79E00000%20%20%20%200x79EFFFFF%20%201048575%20%20%3B%20RTU0_CRAM_5_AXIF%20(Code%20ram%205%20AXIF)%0A*%200x79F00000%20%20%20%200x79FFFFFF%20%201048575%20%20%3B%20RTU0_CRAM_6_AXIF%20(Code%20ram%206%20AXIF)%0A*%200x4E400000%20%20%20%200x4E400FFF%20%204096%20%20%20%20%20%3B%20AE_SRAM%0A*%2F%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EI%20have%20also%20tried%20to%20use%20the%20.elf%20format%20as%20the%20application%20bootloader%20in%20the%20IVT%20tool%20as%20I%20understand%20it%20basically%20helps%20reduce%20the%20unused%20space%20by%20defining%20RAM%20start%20sections%20with%20length%20and%20should%20reduce%20the%20amount%20of%20unused%20space%20in%20the%20binary%2C%20but%20I%20could%20not%20get%20it%20working%20as%20intended.%3C%2FP%3E%3CP%3ENow%20I%20have%20three%20main%20issues%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CSTRONG%3ECan%20I%20use%20the%20raw%20binary%20version%20for%20my%20application%20bootloader%20in%20the%20IVT%20TOOL%20or%20can%20the%20bootROM%20also%20interpret%20the%20.elf%20format%20correctly%3F%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3EIf%20I%20can%20not%20use%20the%20.elf%20format%2C%20then%20how%20can%20I%20make%20my%20raw%20binary%20usable%3F%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EWhen%20I%20am%20trying%20to%20boot%20from%20the%20R52_0%20core%2C%20what%20should%20I%20set%20as%20RAM%20ENTRY%20pointer.%26nbsp%3B%3C%2FSTRONG%3EThe%20datasheet%20states%20%22If%20Boot%20Target%20is%201%2C%20the%20allowed%20SRAM%20range%20for%20application%20download%20is%20in%20the%20RTU0%20Code%20RAM%20region%20in%20the%20address%20range%203210_0000h%20to%20327F_FFFFh.%22%2C%20so%20it%20has%20to%20be%20something%20in%20this%20range%2C%20but%20%3CSTRONG%3Eshould%20it%20be%20set%20to%20Reset_Handler%2C%20ETABLE%20or%20VTABLE%20or%20something%20else%20entirely%3F%26nbsp%3B%3C%2FSTRONG%3EFor%20the%20M33%20SMU%20core%20I%20had%20to%20set%20it%20as%20the%20start%20of%20VTABLE%20and%20then%20the%20VTABLE%20would%20point%20to%20Reset_Handler%2C%20but%20how%20does%20it%20work%20for%20the%20R%20cores%3F%3C%2FLI%3E%3CLI%3EI%20feel%20like%20I%20have%20some%20mismatch%20of%20addresses.%20For%20example%2C%20I%20can%20see%20from%20the%20map%20file%2C%20that%20my%20exception%20vector%20table%20should%20be%20at%200x3210_0360%3A%3C%2FLI%3E%3C%2FOL%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E*(.extable)%0A%20.extable%20%20%20%20%20%20%200x32100340%20%20%20%20%20%20%200x20%20.%2FProject_Settings%2FStartup_Code%2FVector_Table.o%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32100340%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ETABLE%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32100360%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.%20%3D%20ALIGN%20(0x4)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32100360%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20__exceptions_ram_end%20%3D%20.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32100360%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20__interrupts_ram_start%20%3D%20.%0A%20*(.intc_vector)%0A%20.intc_vector%20%20%200x32100360%20%20%20%20%20%200xf04%20.%2FProject_Settings%2FStartup_Code%2FVector_Table.o%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32100360%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20DEFAULT_VECTOR%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32101264%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.%20%3D%20ALIGN%20(0x4)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32101264%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20__interrupts_ram_end%20%3D%20.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32101264%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.%20%3D%20ALIGN%20(0x4)%0A%20*(.startup)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x32101264%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.%20%3D%20ALIGN%20(0x4)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ESince%20I%20don't%20have%20any%20interrupts%20defined%20it%20makes%20sense%20that%20every%20entry%20will%20point%20to%20undefined_handler%2C%20which%20I%20should%20be%20able%20to%20see%20from%20my%20raw_binary%3A%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20693px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20693px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20693px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20693px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20693px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F379660i240AA8CE882BC100%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3EBut%20undefined_handler%20address%20is%20set%20at%200x3210_14d0%20in%20the%20map%20file%3A%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x321014ce%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20HVC_Handler%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x321014d0%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20undefined_handler%0A%20*fill*%20%20%20%20%20%20%20%20%200x321014d2%20%20%20%20%20%20%20%200x2%20%0A%20.systeminit%20%20%20%200x321014d4%20%20%20%20%20%200x124%20.%2FProject_Settings%2FStartup_Code%2Fsystem.o%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CSTRONG%3E%3CBR%20%2F%3EWill%20it%20be%20a%20problem%20or%20is%20that%20off%20by%20one%20error%20somehow%20accounted%20for%20somewhere%20else%3F%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2338952%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Booting%20R52_0%20from%20QSPI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2338952%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CSPAN%3EHiddenSquid%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20contacting%20us.%3C%2FP%3E%0A%3CP%3EI%20have%20received%20your%20question%20and%20will%20help%20you%20to%20check%20it.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2339235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Booting%20R52_0%20from%20QSPI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2339235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2CHiddenSquid%3C%2FP%3E%0A%3CP%3ECould%20you%20post%20your%20case%20to%20this%20link%3A%20%3CA%20href%3D%22https%3A%2F%2Fsupport.nxp.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.nxp.com%3C%2FA%3E%26nbsp%3B%20%26nbsp%3B%3F%3C%2FP%3E%0A%3CP%3EThen%2C%20Copy%20this%20link%20and%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F24963%22%20target%3D%22_blank%22%3E%40Joey%3C%2FA%3E%20in%20the%20support%20system.%20It%26nbsp%3Bis%20more%20convinced%20to%20share%20information%20about%20Booting%20R52_0%20from%20QSPI%20with%20you.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2339223%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Booting%20R52_0%20from%20QSPI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2339223%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CSPAN%3EHiddenSquid%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20can%20also%20see%20that%20the%20binary%20is%20mostly%20empty%20in%20the%20beginning.%20There%20is%20some%20data%20at%200x0%20-%200x20%20and%20then%20it%20is%20just%20zeros%20until%200x0098_0000%2C%20which%20makes%20sense%2C%20because%20I%20can%20see%20from%20my%20linker%20file%20that%20DRAM%20starts%20at%200x3178_0000%20and%20CRAM%20start%20at%200x3210_0000%20(0x3210_0000%26nbsp%3B%20-%200x3178_0000%26nbsp%3B%20%3D%200x0098_0000)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26gt%3B%26gt%3B%26gt%3B%3C%2FSPAN%3EFor%20the%20RTD%20R52%20example%20project%2C%20the%20size%20of%20the%20compiled%20bin%20file%20is%20close%20to%208MB%2C%20which%20is%20too%20large.%20The%20reason%20is%20that%20the%20linker%20file%20defines%20the%20Code%20RAM%20as%20starting%20from%200x32100000%20(RTU0_CRAM_0)%2C%20and%20the%20Data%20RAM%20as%20starting%20from%200x31780000%20(RTU0_DRAM_0)%2C%20and%20the%20compiler%20will%20automatically%20fill%20in%20invalid%20data%20in%20these%20address%20range%20to%20keep%20the%20binary%20content%20continuous.%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20reduce%20the%20size%20of%20the%20compiled%20binary%2C%20you%20need%20to%20modify%20the%20linker%20script%20as%20well%20as%20the%20startup%20code%20to%20relocate%20Data%20RAM%20in%20RTU0_CRAM%20so%20that%20the%20binary%20will%20not%20have%20a%20large%20address%20gap%20with%20invalid%20data%20filling.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EJoey%3C%2FP%3E%3C%2FLINGO-BODY%3E