summaryrefslogtreecommitdiff
path: root/src/stm
diff options
context:
space:
mode:
Diffstat (limited to 'src/stm')
-rw-r--r--src/stm/altos-512.ld4
-rw-r--r--src/stm/altos-loader.ld4
-rw-r--r--src/stm/altos-ram.ld4
-rw-r--r--src/stm/altos.ld4
-rw-r--r--src/stm/ao_adc_single_stm.c2
-rw-r--r--src/stm/ao_adc_stm.c6
-rw-r--r--src/stm/ao_arch.h5
-rw-r--r--src/stm/ao_beep_stm.c2
-rw-r--r--src/stm/ao_eeprom_stm.c6
-rw-r--r--src/stm/ao_interrupt.c4
-rw-r--r--src/stm/ao_led.c2
-rw-r--r--src/stm/ao_timer.c4
-rw-r--r--src/stm/ao_usb_stm.c2
13 files changed, 22 insertions, 27 deletions
diff --git a/src/stm/altos-512.ld b/src/stm/altos-512.ld
index 78c41685..97a9c437 100644
--- a/src/stm/altos-512.ld
+++ b/src/stm/altos-512.ld
@@ -74,10 +74,10 @@ SECTIONS {
/* Data -- relocated to RAM, but written to ROM
*/
.data : {
- __data_start__ = .;
+ _start__ = .;
*(.data) /* initialized data */
. = ALIGN(4);
- __data_end__ = .;
+ _end__ = .;
} >ram AT>rom
.bss : {
diff --git a/src/stm/altos-loader.ld b/src/stm/altos-loader.ld
index 806b4842..1ebbc7a2 100644
--- a/src/stm/altos-loader.ld
+++ b/src/stm/altos-loader.ld
@@ -65,7 +65,7 @@ SECTIONS {
*/
.textram BLOCK(8): {
- __data_start__ = .;
+ _start__ = .;
__text_ram_start__ = .;
*(.ramtext)
__text_ram_end = .;
@@ -76,7 +76,7 @@ SECTIONS {
*/
.data BLOCK(8): {
*(.data) /* initialized data */
- __data_end__ = .;
+ _end__ = .;
} >ram AT>rom
diff --git a/src/stm/altos-ram.ld b/src/stm/altos-ram.ld
index 098454e1..d8f072a7 100644
--- a/src/stm/altos-ram.ld
+++ b/src/stm/altos-ram.ld
@@ -42,13 +42,13 @@ SECTIONS {
__text_end__ = .;
} > ram
- __data_start__ = .;
+ _start__ = .;
/* Data -- relocated to RAM, but written to ROM
*/
.data : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) {
*(.data) /* initialized data */
- __data_end__ = .;
+ _end__ = .;
__bss_start__ = .;
} >ram
diff --git a/src/stm/altos.ld b/src/stm/altos.ld
index 6a8c7113..e352ed36 100644
--- a/src/stm/altos.ld
+++ b/src/stm/altos.ld
@@ -74,10 +74,10 @@ SECTIONS {
/* Data -- relocated to RAM, but written to ROM
*/
.data : {
- __data_start__ = .;
+ _start__ = .;
*(.data) /* initialized data */
. = ALIGN(4);
- __data_end__ = .;
+ _end__ = .;
} >ram AT>rom
.bss : {
diff --git a/src/stm/ao_adc_single_stm.c b/src/stm/ao_adc_single_stm.c
index 8a7fda4a..5737cd50 100644
--- a/src/stm/ao_adc_single_stm.c
+++ b/src/stm/ao_adc_single_stm.c
@@ -95,7 +95,7 @@ ao_adc_dump(void)
AO_ADC_DUMP(&packet);
}
-__code struct ao_cmds ao_adc_cmds[] = {
+const struct ao_cmds ao_adc_cmds[] = {
{ ao_adc_dump, "a\0Display current ADC values" },
{ 0, NULL },
};
diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c
index 24912bb2..2399e6a2 100644
--- a/src/stm/ao_adc_stm.c
+++ b/src/stm/ao_adc_stm.c
@@ -100,7 +100,7 @@ ao_adc_poll(void)
* Fetch a copy of the most recent ADC data
*/
void
-ao_adc_get(__xdata struct ao_adc *packet)
+ao_adc_get(struct ao_adc *packet)
{
#if HAS_FLIGHT
uint8_t i = ao_data_ring_prev(ao_sample_data);
@@ -177,7 +177,7 @@ static const char *ao_adc_name[AO_NUM_ADC] = {
#endif
static void
-ao_adc_dump(void) __reentrant
+ao_adc_dump(void)
{
struct ao_data packet;
#ifndef AO_ADC_DUMP
@@ -203,7 +203,7 @@ ao_adc_dump(void) __reentrant
#endif
}
-__code struct ao_cmds ao_adc_cmds[] = {
+const struct ao_cmds ao_adc_cmds[] = {
{ ao_adc_dump, "a\0Display current ADC values" },
{ 0, NULL },
};
diff --git a/src/stm/ao_arch.h b/src/stm/ao_arch.h
index 7b08b891..aee9df3c 100644
--- a/src/stm/ao_arch.h
+++ b/src/stm/ao_arch.h
@@ -41,11 +41,6 @@
#define ao_arch_naked_declare __attribute__((naked))
#define ao_arch_naked_define
-#define __pdata
-#define __data
-#define __xdata
-#define __code const
-#define __reentrant
#define __interrupt(n)
#define __at(n)
diff --git a/src/stm/ao_beep_stm.c b/src/stm/ao_beep_stm.c
index 0b4e6012..f9fa14c2 100644
--- a/src/stm/ao_beep_stm.c
+++ b/src/stm/ao_beep_stm.c
@@ -132,7 +132,7 @@ ao_beep(uint8_t beep)
}
void
-ao_beep_for(uint8_t beep, uint16_t ticks) __reentrant
+ao_beep_for(uint8_t beep, uint16_t ticks)
{
ao_beep(beep);
ao_delay(ticks);
diff --git a/src/stm/ao_eeprom_stm.c b/src/stm/ao_eeprom_stm.c
index 4f477122..d3e3338d 100644
--- a/src/stm/ao_eeprom_stm.c
+++ b/src/stm/ao_eeprom_stm.c
@@ -117,10 +117,10 @@ ao_intflash_read(uint16_t pos)
*/
uint8_t
-ao_eeprom_write(ao_pos_t pos32, __xdata void *v, uint16_t len)
+ao_eeprom_write(ao_pos_t pos32, void *v, uint16_t len)
{
uint16_t pos = pos32;
- __xdata uint8_t *d = v;
+ uint8_t *d = v;
if (pos >= ao_eeprom_total || pos + len > ao_eeprom_total)
return 0;
@@ -151,7 +151,7 @@ ao_eeprom_write(ao_pos_t pos32, __xdata void *v, uint16_t len)
* Read from eeprom
*/
uint8_t
-ao_eeprom_read(ao_pos_t pos, __xdata void *v, uint16_t len)
+ao_eeprom_read(ao_pos_t pos, void *v, uint16_t len)
{
uint8_t *d = v;
diff --git a/src/stm/ao_interrupt.c b/src/stm/ao_interrupt.c
index eb1ed0b5..d8be3667 100644
--- a/src/stm/ao_interrupt.c
+++ b/src/stm/ao_interrupt.c
@@ -24,7 +24,7 @@
extern void main(void);
extern char __stack__;
extern char __text_start__, __text_end__;
-extern char __data_start__, __data_end__;
+extern char _start__, _end__;
extern char __bss_start__, __bss_end__;
/* Interrupt functions */
@@ -83,7 +83,7 @@ void start(void)
#endif
/* Set interrupt vector table offset */
stm_nvic.vto = (uint32_t) &stm_interrupt_vector;
- memcpy(&__data_start__, &__text_end__, &__data_end__ - &__data_start__);
+ memcpy(&_start__, &__text_end__, &_end__ - &_start__);
memset(&__bss_start__, '\0', &__bss_end__ - &__bss_start__);
main();
}
diff --git a/src/stm/ao_led.c b/src/stm/ao_led.c
index a7033dbb..bd83f4e4 100644
--- a/src/stm/ao_led.c
+++ b/src/stm/ao_led.c
@@ -153,7 +153,7 @@ ao_led_toggle(AO_LED_TYPE colors)
}
void
-ao_led_for(AO_LED_TYPE colors, AO_LED_TYPE ticks) __reentrant
+ao_led_for(AO_LED_TYPE colors, AO_LED_TYPE ticks)
{
ao_led_on(colors);
ao_delay(ticks);
diff --git a/src/stm/ao_timer.c b/src/stm/ao_timer.c
index 9d118b72..9e9436cf 100644
--- a/src/stm/ao_timer.c
+++ b/src/stm/ao_timer.c
@@ -39,8 +39,8 @@ ao_time(void)
#endif
#if AO_DATA_ALL
-volatile __data uint8_t ao_data_interval = 1;
-volatile __data uint8_t ao_data_count;
+volatile uint8_t ao_data_interval = 1;
+volatile uint8_t ao_data_count;
#endif
void stm_systick_isr(void)
diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c
index b06814d2..d7cbd5b7 100644
--- a/src/stm/ao_usb_stm.c
+++ b/src/stm/ao_usb_stm.c
@@ -1079,7 +1079,7 @@ ao_usb_irq(void)
control_count, out_count, in_count, int_count, reset_count);
}
-__code struct ao_cmds ao_usb_cmds[] = {
+const struct ao_cmds ao_usb_cmds[] = {
{ ao_usb_irq, "I\0Show USB interrupt counts" },
{ 0, NULL }
};