Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Committer:
sahilmgandhi
Date:
Sun May 14 23:18:57 2017 +0000
Revision:
18:6a4db94011d3
Publishing again

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sahilmgandhi 18:6a4db94011d3 1 /* [ROM = 64kb = 0x10000] */
sahilmgandhi 18:6a4db94011d3 2 define symbol __intvec_start__ = 0x08000000;
sahilmgandhi 18:6a4db94011d3 3 define symbol __region_ROM_start__ = 0x08000000;
sahilmgandhi 18:6a4db94011d3 4 define symbol __region_ROM_end__ = 0x0800FFFF;
sahilmgandhi 18:6a4db94011d3 5
sahilmgandhi 18:6a4db94011d3 6 /* [RAM = 8kb = 0x2000] Vector table dynamic copy: 48 vectors = 192 bytes (0xC0) to be reserved in RAM */
sahilmgandhi 18:6a4db94011d3 7 define symbol __NVIC_start__ = 0x20000000;
sahilmgandhi 18:6a4db94011d3 8 define symbol __NVIC_end__ = 0x200000BF; /* Aligned on 8 bytes */
sahilmgandhi 18:6a4db94011d3 9 define symbol __region_RAM_start__ = 0x200000C0;
sahilmgandhi 18:6a4db94011d3 10 define symbol __region_RAM_end__ = 0x20001FFF;
sahilmgandhi 18:6a4db94011d3 11
sahilmgandhi 18:6a4db94011d3 12 /* Memory regions */
sahilmgandhi 18:6a4db94011d3 13 define memory mem with size = 4G;
sahilmgandhi 18:6a4db94011d3 14 define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__];
sahilmgandhi 18:6a4db94011d3 15 define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
sahilmgandhi 18:6a4db94011d3 16
sahilmgandhi 18:6a4db94011d3 17 /* Stack and Heap */
sahilmgandhi 18:6a4db94011d3 18 define symbol __size_cstack__ = 0x400;
sahilmgandhi 18:6a4db94011d3 19 define symbol __size_heap__ = 0x800;
sahilmgandhi 18:6a4db94011d3 20 define block CSTACK with alignment = 8, size = __size_cstack__ { };
sahilmgandhi 18:6a4db94011d3 21 define block HEAP with alignment = 8, size = __size_heap__ { };
sahilmgandhi 18:6a4db94011d3 22 define block STACKHEAP with fixed order { block HEAP, block CSTACK };
sahilmgandhi 18:6a4db94011d3 23
sahilmgandhi 18:6a4db94011d3 24 initialize by copy with packing = zeros { readwrite };
sahilmgandhi 18:6a4db94011d3 25 do not initialize { section .noinit };
sahilmgandhi 18:6a4db94011d3 26
sahilmgandhi 18:6a4db94011d3 27 place at address mem:__intvec_start__ { readonly section .intvec };
sahilmgandhi 18:6a4db94011d3 28
sahilmgandhi 18:6a4db94011d3 29 place in ROM_region { readonly };
sahilmgandhi 18:6a4db94011d3 30 place in RAM_region { readwrite, block STACKHEAP };