Is it possible to use the external memory (XMEM) interface of an ATmega2560 with the Arduino Simulink Support Package ?
5 views (last 30 days)
Show older comments
Hello,
I am using simulink with an Arduino Mega 2560 (Atmel ATmega2560 microcontroller). I would like to know if it is possible to use the external memory (XMEM) interface of this microcontroller with the Simulink support package ? In my model, I have to deal with big array. It is the reason why I run out of 8kbyte data memory (.data + .bss + .noinit).
Here is the things I have already done :
- I followed the Andy’s tutorial (<http://andybrown.me.uk/2011/08/28/512kb-sram-expansion-for-the-arduino-mega-design/>) to increase the Arduino Mega 2560 SRAM. With the Arduino IDE, I succeeded to declare a big array in the external SRAM using malloc(). So the hardware seems to be good.
- I read some documents about memory section of the Atmel microcontrollers (https://www.nongnu.org/avr-libc/user-manual/mem_sections.html) and I tried to modify the linkers of Simulink Code Generation to move .data .bss and the heap in the external SRAM but it is not working (However, I am not well with Linkers, maybe I am doing something wrong in linkers customization).
I think that the solution is to move “Block signals” and “Block states” structures of the generate code in the external SRAM but I don’t know how to proceed.
Thank for your advice,
Regards
FG
0 Comments
Answers (0)
See Also
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!