Mouse code for the MacroRat
mbed-dev/targets/TARGET_NUVOTON/TARGET_NUC472/device/TOOLCHAIN_ARM_MICRO/sys.cpp@46:b156ef445742, 2017-06-03 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sat Jun 03 00:22:44 2017 +0000
- Revision:
- 46:b156ef445742
- Parent:
- 18:6a4db94011d3
Final code for internal battlebot competition.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | /* mbed Microcontroller Library - stackheap |
sahilmgandhi | 18:6a4db94011d3 | 2 | * Copyright (C) 2009-2011 ARM Limited. All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 3 | * |
sahilmgandhi | 18:6a4db94011d3 | 4 | * Setup a fixed single stack/heap memory model, |
sahilmgandhi | 18:6a4db94011d3 | 5 | * between the top of the RW/ZI region and the stackpointer |
sahilmgandhi | 18:6a4db94011d3 | 6 | */ |
sahilmgandhi | 18:6a4db94011d3 | 7 | |
sahilmgandhi | 18:6a4db94011d3 | 8 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 9 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 10 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 11 | |
sahilmgandhi | 18:6a4db94011d3 | 12 | #include <rt_misc.h> |
sahilmgandhi | 18:6a4db94011d3 | 13 | #include <stdint.h> |
sahilmgandhi | 18:6a4db94011d3 | 14 | |
sahilmgandhi | 18:6a4db94011d3 | 15 | extern char Image$$ARM_LIB_STACK$$ZI$$Limit[]; |
sahilmgandhi | 18:6a4db94011d3 | 16 | extern char Image$$ARM_LIB_HEAP$$Base[]; |
sahilmgandhi | 18:6a4db94011d3 | 17 | extern char Image$$ARM_LIB_HEAP$$ZI$$Limit[]; |
sahilmgandhi | 18:6a4db94011d3 | 18 | extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) { |
sahilmgandhi | 18:6a4db94011d3 | 19 | |
sahilmgandhi | 18:6a4db94011d3 | 20 | struct __initial_stackheap r; |
sahilmgandhi | 18:6a4db94011d3 | 21 | r.heap_base = (uint32_t)Image$$ARM_LIB_HEAP$$Base; |
sahilmgandhi | 18:6a4db94011d3 | 22 | r.heap_limit = (uint32_t)Image$$ARM_LIB_HEAP$$ZI$$Limit; |
sahilmgandhi | 18:6a4db94011d3 | 23 | return r; |
sahilmgandhi | 18:6a4db94011d3 | 24 | } |
sahilmgandhi | 18:6a4db94011d3 | 25 | |
sahilmgandhi | 18:6a4db94011d3 | 26 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 27 | } |
sahilmgandhi | 18:6a4db94011d3 | 28 | #endif |