Memory map issues with MKV42F256xxx16 while using ARM GCC toolchain

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Memory map issues with MKV42F256xxx16 while using ARM GCC toolchain

861 次查看
dhruvkakadiya
Contributor I

Device: MKV42F256xxx16

Project: Running multiple tasks with FreeRTOS

Compiler toolchain: ARM GCC 9.2.1 20191025 (release)

MCUxpresso SDK: 2.7.0

Linker file: MKV42F256xxx16_flash.ld

I have a task running with few global static variables which are being used locally inside a task. So I need to keep those variables in specific order and also specific number of bytes at global level(so ultimately at BSS section) and if I have all of that in proper order then only code is able to run as expected. If I try to remove some variables from global space or change any variable sequences in there then getting different kinds of issues in which code would get into FreeRTOS assertions or not run expected code.

So it looks to me that there should be linker file issue that's been provided with the SDK itself. So can anyone please help me with this issue? Because usually linker file provides an algorithm/code to put different data sections at appropriate place within memory etc.

Attached linker file and startup file in here for the reference. These files are exactly same as what come with the SDK.

Thank you!

0 项奖励
回复
1 回复

761 次查看
myke_predko
Senior Contributor III

dhruvkakadiya

Could you please explain what you are doing that requires variables in a specific order or only as global variables?  I'm not very familiar with the MKV42 (I pulled up the datasheet and RM) but don't see any high level issues that would neccesitate having to put task global variables in a specific order or could not be local variables to the task methods.  

I've questioned how SRAM is presented (as two separate blocks) in the SDK/MCUXpresso device software defiinition and it has caused me some grief.  Maybe you are running afoul of the same issues.  

Thanx,

myke

0 项奖励
回复