Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: problem implementing ULP5.1

$
0
0
Hi anyone... i'm trying to implement ulp5.1 recommendation of moving my divide functions from flash into ram.... I've followed TI's example and the code does get put into ram as per the map file, but when viewed in the debugger dissassembly i see a whole lot of duplicated nonsense code (almost like default memory values) so naturally once the PC is set to the function it never returns! MSP430F3736, CCS 6.1.2.00015, compiler tools 4.4.7, c/c++ dev tools 8.5.0.201409172108 MEMORY { SFR : origin = 0x0000, length = 0x0010 PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0 PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100 RAM_EXECUTE : origin = 0x1C00, length = 0x0100 RAM : origin = 0x1D00, length = 0x1F00 INFOA : origin = 0x1980, length = 0x0080 INFOB : origin = 0x1900, length = 0x0080 INFOC : origin = 0x1880, length = 0x0080 INFOD : origin = 0x1800, length = 0x0080 FLASH_EXECUTE : origin = 0x4000, length = 0x0100 / FLASH : origin = 0x4100, length = 0xBE80 FLASH2 : origin = 0x10000,length = 0x14000 INT00 : origin = 0xFF80, length = 0x0002 ..etc ..etc } SECTIONS { .bss : {} > RAM /* Global & static vars */ .data : {} > RAM /* Global & static vars */ .TI.noinit : {} > RAM /* For #pragma noinit */ .sysmem : {} > RAM /* Dynamic memory allocation area */ .stack : {} > RAM (HIGH) /* Software system stack */ .run_from_ram : load = FLASH_EXECUTE, run = RAM_EXECUTE #ifndef __LARGE_DATA_MODEL__ .text : {}>> FLASH /* Code */ #else .text : {}>> FLASH2 | FLASH ..etc ..etc } #pragma CODE_SECTION(DivByInt32,".run_from_ram") int32_t DivByInt32(int32_t valToDivide,int32_t divisor) { return(valToDivide/divisor); } #pragma CODE_SECTION(DivByInt16,".run_from_ram") int32_t DivByInt16(int32_t valToDivide,int16_t divisor) { return(valToDivide/divisor); } thanks

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>