S32K144 SRAM address configuration

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

S32K144 SRAM address configuration

Jump to solution
1,491 Views
AlexKlose
Contributor I

Hi NXP team,

We are currently using S32K144 and have encountered a problem. Could you please help us solve it? Thanks!

From S32K1xx_Memory_Map.xlsx of the RM, the start address of SRAM_U is 0x2000_0000:

AlexKlose_1-1744941311393.png

Could m_data_2‘s ORIGIN in the link file S32K144_64_flash.ld of S32K144 be set arbitrarily? For example, can it be changed to be less than 0x2000_0000 as following?

AlexKlose_0-1744941218046.png

BTW, we made an initial attempt(change m_data_2‘s ORIGIN to 0x1FFFE000) and confirmed that the compilation could be successfully passed in the S32DS environment, and the generated program could be smoothly downloaded to the S32K144 product board with a normal running status.

 

Thanks, 

Alex

 

0 Kudos
Reply
1 Solution
1,431 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@AlexKlose

There will be no error if you define it this way, and there will be no error if you download it to MCU.
What I want to tell you is that we have some considerations when designing the link file in this way, and it is allocated according to SRAM_L and SRAM_U.
Whether there are potential problems when you modify the link file in this way, you need to do sufficient testing yourself.

View solution in original post

0 Kudos
Reply
6 Replies
1,466 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@AlexKlose

The reason why we define it this way is based on the physical address space of the two blocks of SRAM, which is more reasonable, but you will not get an error if you define it this way.

For s32k144,

the SRAM_L  address range is :0x1FFF8000~0x1FFFFFFF

the SRAM_U address range is: 0x20000000~0x20006FFF

Senlent_0-1744959493231.png

0x1FFFE000 is in the range SRAM_L, but it is not SRAM_U.

 

0 Kudos
Reply
1,456 Views
AlexKlose
Contributor I

Hi Senlent,

Thanks for your quick response.

Since SRAM_L and SRAM_U are two separate physical RAMs, is this operation (m_data_2‘s ORIGIN to 0x1FFFE000) compliant? What risks does it entail? 

"which is more reasonable, but you will not get an error if you define it this way." That means we can still do it this way to expand the space of m_data_2  although this operation is not recommended?

 

Thanks,

Alex

0 Kudos
Reply
1,453 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@AlexKlose

Usually users may not pay attention to the fact that SRAM_L and SRAM_U are two different blocks.

This needs to be noted when dealing with certain issues, such as ECC processing.

Senlent_0-1744964837520.png

 

0 Kudos
Reply
1,443 Views
AlexKlose
Contributor I

Hi Senlent,

Sorry, I still don't quite understand what you meant in the last post...

I merely want to make sure whether this operation(m_data_2‘s ORIGIN to 0x1FFFE000) itself is legal or not. If not, we would try to optimize the code to reduce the size of the .bss section.

 

Thanks,

Alex

0 Kudos
Reply
1,432 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@AlexKlose

There will be no error if you define it this way, and there will be no error if you download it to MCU.
What I want to tell you is that we have some considerations when designing the link file in this way, and it is allocated according to SRAM_L and SRAM_U.
Whether there are potential problems when you modify the link file in this way, you need to do sufficient testing yourself.

0 Kudos
Reply
1,393 Views
AlexKlose
Contributor I

Hi Senlent,

OK got it, thanks a lot.

 

Thanks,

Alex

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2082914%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K144%20SRAM%20address%20configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082914%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20NXP%20team%2C%3C%2FP%3E%3CP%3EWe%20are%20currently%20using%20S32K144%20and%20have%20encountered%20a%20problem.%20Could%20you%20please%20help%20us%20solve%20it%3F%20Thanks!%3C%2FP%3E%3CP%3EFrom%26nbsp%3BS32K1xx_Memory_Map.xlsx%20of%20the%20RM%2C%20the%20start%20address%20of%20SRAM_U%20is%26nbsp%3B0x2000_0000%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AlexKlose_1-1744941311393.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22AlexKlose_1-1744941311393.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333795i006C612220C2C84F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AlexKlose_1-1744941311393.png%22%20alt%3D%22AlexKlose_1-1744941311393.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ECould%20%3CEM%3Em_data_2%E2%80%98s%3C%2FEM%3E%20%3CEM%3EORIGIN%3C%2FEM%3E%20in%20the%20link%20file%20%3CEM%3ES32K144_64_flash.ld%3C%2FEM%3E%20of%20S32K144%20be%20set%20arbitrarily%3F%20For%20example%2C%20can%20it%20be%20changed%20to%20be%20less%20than%200x2000_0000%20as%20following%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AlexKlose_0-1744941218046.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22AlexKlose_0-1744941218046.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333794i6701B9A74A943DEC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AlexKlose_0-1744941218046.png%22%20alt%3D%22AlexKlose_0-1744941218046.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EBTW%2C%20we%20made%20an%20initial%20attempt(change%20%3CEM%3Em_data_2%E2%80%98s%3C%2FEM%3E%20%3CEM%3EORIGIN%20%3C%2FEM%3Eto%200x1FFFE000)%20and%20confirmed%20that%20the%20compilation%20could%20be%20successfully%20passed%20in%20the%20S32DS%20environment%2C%20and%20the%20generated%20program%20could%20be%20smoothly%20downloaded%20to%20the%20S32K144%20product%20board%20with%20a%20normal%20running%20status.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%2C%26nbsp%3B%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2083425%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K144%20SRAM%20address%20configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083425%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Senlent%2C%3C%2FP%3E%3CP%3EOK%20got%20it%2C%20thanks%20a%20lot.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2083222%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K144%20SRAM%20address%20configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083222%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EAlexKlose%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThere%20will%20be%20no%20error%20if%20you%20define%20it%20this%20way%2C%20and%20there%20will%20be%20no%20error%20if%20you%20download%20it%20to%20MCU.%3CBR%20%2F%3EWhat%20I%20want%20to%20tell%20you%20is%20that%20we%20have%20some%20considerations%20when%20designing%20the%20link%20file%20in%20this%20way%2C%20and%20it%20is%20allocated%20according%20to%20SRAM_L%20and%20SRAM_U.%3CBR%20%2F%3EWhether%20there%20are%20potential%20problems%20when%20you%20modify%20the%20link%20file%20in%20this%20way%2C%20you%20need%20to%20do%20sufficient%20testing%20yourself.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2083210%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K144%20SRAM%20address%20configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083210%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Senlent%2C%3C%2FP%3E%3CP%3ESorry%2C%20I%20still%20don't%20quite%20understand%20what%20you%20meant%20in%20the%20last%20post...%3C%2FP%3E%3CP%3EI%20merely%20want%20to%20make%20sure%20whether%20this%20operation%3CSPAN%3E(%3C%2FSPAN%3E%3CEM%3Em_data_2%E2%80%98s%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EORIGIN%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FEM%3E%3CSPAN%3Eto%200x1FFFE000%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%20itself%20is%20legal%20or%20not.%20If%20not%2C%20we%20would%20try%20to%20optimize%20the%20code%20to%20reduce%20the%20size%20of%20the%20.bss%20section.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2083195%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K144%20SRAM%20address%20configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083195%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CA%20id%3D%22link_16%22%20class%3D%22lia-link-navigation%20lia-page-link%20lia-user-name-link%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F249480%22%20target%3D%22_self%22%20aria-label%3D%22View%20Profile%20of%20AlexKlose%22%3E%3CSPAN%20class%3D%22%22%3EAlexKlose%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EUsually%20users%20may%20not%20pay%20attention%20to%20the%20fact%20that%20SRAM_L%20and%20SRAM_U%20are%20two%20different%20blocks.%3C%2FP%3E%0A%3CP%3EThis%20needs%20to%20be%20noted%20when%20dealing%20with%20certain%20issues%2C%20such%20as%20ECC%20processing.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1744964837520.png%22%20style%3D%22width%3A%20650px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1744964837520.png%22%20style%3D%22width%3A%20650px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333901iA4027D23F010D817%2Fimage-dimensions%2F650x203%3Fv%3Dv2%22%20width%3D%22650%22%20height%3D%22203%22%20role%3D%22button%22%20title%3D%22Senlent_0-1744964837520.png%22%20alt%3D%22Senlent_0-1744964837520.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2083164%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K144%20SRAM%20address%20configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083164%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Senlent%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20quick%20response.%3C%2FP%3E%3CP%3ESince%20SRAM_L%20and%20SRAM_U%20are%20two%20separate%20physical%20RAMs%2C%20is%20this%20operation%20(%3CEM%3Em_data_2%E2%80%98s%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EORIGIN%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FEM%3E%3CSPAN%3Eto%200x1FFFE000%3C%2FSPAN%3E)%20compliant%3F%20What%20risks%20does%20it%20entail%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%22%3CSPAN%3Ewhich%20is%20more%20reasonable%2C%20but%20you%20will%20not%20get%20an%20error%20if%20you%20define%20it%20this%20way.%3C%2FSPAN%3E%22%20That%20means%26nbsp%3Bwe%20can%20still%20do%20it%20this%20way%20to%20expand%20the%20space%20of%20%3CEM%3Em_data_2%26nbsp%3B%20%3C%2FEM%3Ealthough%20this%20operation%20is%20not%20recommended%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2083111%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K144%20SRAM%20address%20configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083111%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EAlexKlose%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20reason%20why%20we%20define%20it%20this%20way%20is%20based%20on%20the%20physical%20address%20space%20of%20the%20two%20blocks%20of%20SRAM%2C%20which%20is%20more%20reasonable%2C%20but%20you%20will%20not%20get%20an%20error%20if%20you%20define%20it%20this%20way.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFor%20s32k144%2C%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ethe%20%3C%2FSPAN%3E%3CSPAN%3ESRAM_L%26nbsp%3B%20address%20range%20is%20%3A%3CSTRONG%3E0x1FFF8000~0x1FFFFFFF%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Ethe%20SRAM_U%20address%20range%20is%3A%20%3CSTRONG%3E0x20000000~0x20006FFF%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1744959493231.png%22%20style%3D%22width%3A%20745px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1744959493231.png%22%20style%3D%22width%3A%20745px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333865iBEC1005CFA2F76DD%2Fimage-dimensions%2F745x365%3Fv%3Dv2%22%20width%3D%22745%22%20height%3D%22365%22%20role%3D%22button%22%20title%3D%22Senlent_0-1744959493231.png%22%20alt%3D%22Senlent_0-1744959493231.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E0x1FFFE000%20is%20in%20the%20range%20SRAM_L%2C%20but%20it%20is%20not%20SRAM_U.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E