[56F835x] Small Data Memory (sdm) and pRAM.

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

[56F835x] Small Data Memory (sdm) and pRAM.

1,929 次查看
jmn
Contributor I
Hi,
 
I'm wondering if it's possible to use program ram (mapping at 0x02F800) if the project is compiled on small data memory ?
And is it possible to use sdm for bootloader (bootflash is mapping at 0x02000) ?
 
Thanks for help.
标记 (2)
0 项奖励
回复
2 回复数

696 次查看
J2MEJediMaster
Specialist I
Sorry for the delay in replying. It took a while for me to track down the information.

If you compile your program using the small memory model, it can only go in the first 64K of memory. That's because the compiler generates only 16-bit addresses for JSRs and hardware-supported loops. The linker can't translate these into 24-bit addresses.

---Tom
0 项奖励
回复

696 次查看
Joschi
Contributor I
Hello!

I tried out putting a function written in C code directly into pRAM by specifying an according section in the linker file:

Code:
 .executing_code_ram : {  # Test for putting code explicitely into program RAM:  OBJECT (Ftest_function, main.c)  } > .p_internal_RAM

and the function worked without problems, even using the small data model.

It seems that the program memory is safely useable up to 19bit addressing (7FFFFh) which covers the relevant program address space for the 56F83xx family.

There is an option in Codewarrior Target properties:
"sdm internal memory with pROM-to-xRAM copy" -> Language Settings -> M56800E Assembler,
where you can specify:

Default Data Model: 16bit
Default Program Model: 19bit

Could you please confirm, that this option guarantees a proper compilation and execution in the program memory range up to 7FFFFh while using the small data model?
I would not like switching my program to the large data model due to the lower performance and higher memory requirements just for beeing able to address code above 64K.

Best Regards

PS.: I am programming for 56F8323 with CodeWarrior for DSC56800/E version 8.0


0 项奖励
回复