summaryrefslogtreecommitdiff
path: root/src/stmf0
diff options
context:
space:
mode:
Diffstat (limited to 'src/stmf0')
-rw-r--r--src/stmf0/altos-loader.ld4
-rw-r--r--src/stmf0/altos-raw.ld4
-rw-r--r--src/stmf0/altos.ld4
-rw-r--r--src/stmf0/ao_adc_stm.c2
-rw-r--r--src/stmf0/ao_arch.h5
-rw-r--r--src/stmf0/ao_beep_stm.c2
-rw-r--r--src/stmf0/ao_interrupt.c4
-rw-r--r--src/stmf0/ao_led.c4
-rw-r--r--src/stmf0/ao_storage_stm.c6
-rw-r--r--src/stmf0/ao_timer.c4
-rw-r--r--src/stmf0/ao_usb_stm.c2
11 files changed, 18 insertions, 23 deletions
diff --git a/src/stmf0/altos-loader.ld b/src/stmf0/altos-loader.ld
index 05887d0e..4d9b81ae 100644
--- a/src/stmf0/altos-loader.ld
+++ b/src/stmf0/altos-loader.ld
@@ -66,7 +66,7 @@ SECTIONS {
*/
.textram BLOCK(8): {
- __data_start__ = .;
+ _start__ = .;
__text_ram_start__ = .;
*(.ramtext)
__text_ram_end = .;
@@ -77,7 +77,7 @@ SECTIONS {
*/
.data BLOCK(8): {
*(.data) /* initialized data */
- __data_end__ = .;
+ _end__ = .;
} >ram AT>rom
diff --git a/src/stmf0/altos-raw.ld b/src/stmf0/altos-raw.ld
index eb285e07..90c42ad2 100644
--- a/src/stmf0/altos-raw.ld
+++ b/src/stmf0/altos-raw.ld
@@ -61,10 +61,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/stmf0/altos.ld b/src/stmf0/altos.ld
index 74fdf3ea..64e1d00c 100644
--- a/src/stmf0/altos.ld
+++ b/src/stmf0/altos.ld
@@ -81,10 +81,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/stmf0/ao_adc_stm.c b/src/stmf0/ao_adc_stm.c
index 2b23dc50..571830bb 100644
--- a/src/stmf0/ao_adc_stm.c
+++ b/src/stmf0/ao_adc_stm.c
@@ -180,7 +180,7 @@ ao_adc_one(void)
}
#endif
-__code struct ao_cmds ao_adc_cmds[] = {
+const struct ao_cmds ao_adc_cmds[] = {
{ ao_adc_dump, "a\0Display current ADC values" },
#if AO_ADC_DEBUG
{ ao_adc_one, "A ch\0Display one ADC channel" },
diff --git a/src/stmf0/ao_arch.h b/src/stmf0/ao_arch.h
index db6324cb..15642951 100644
--- a/src/stmf0/ao_arch.h
+++ b/src/stmf0/ao_arch.h
@@ -43,11 +43,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/stmf0/ao_beep_stm.c b/src/stmf0/ao_beep_stm.c
index 15137230..abcc116c 100644
--- a/src/stmf0/ao_beep_stm.c
+++ b/src/stmf0/ao_beep_stm.c
@@ -376,7 +376,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/stmf0/ao_interrupt.c b/src/stmf0/ao_interrupt.c
index a67f6f1a..81878d89 100644
--- a/src/stmf0/ao_interrupt.c
+++ b/src/stmf0/ao_interrupt.c
@@ -35,7 +35,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__;
#if RELOCATE_INTERRUPT
extern char __interrupt_rom__, __interrupt_start__, __interrupt_end__;
@@ -88,7 +88,7 @@ void start(void)
stm_syscfg.cfgr1 = (stm_syscfg.cfgr1 & ~(STM_SYSCFG_CFGR1_MEM_MODE_MASK << STM_SYSCFG_CFGR1_MEM_MODE)) |
(STM_SYSCFG_CFGR1_MEM_MODE_MAIN_FLASH << STM_SYSCFG_CFGR1_MEM_MODE);
#endif
- 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/stmf0/ao_led.c b/src/stmf0/ao_led.c
index 0f39befb..a162932a 100644
--- a/src/stmf0/ao_led.c
+++ b/src/stmf0/ao_led.c
@@ -18,7 +18,7 @@
#include "ao.h"
-__pdata uint16_t ao_led_enable;
+uint16_t ao_led_enable;
void
ao_led_on(uint16_t colors)
@@ -76,7 +76,7 @@ ao_led_toggle(uint16_t colors)
}
void
-ao_led_for(uint16_t colors, uint16_t ticks) __reentrant
+ao_led_for(uint16_t colors, uint16_t ticks)
{
ao_led_on(colors);
ao_delay(ticks);
diff --git a/src/stmf0/ao_storage_stm.c b/src/stmf0/ao_storage_stm.c
index 1a6198a7..17c934a5 100644
--- a/src/stmf0/ao_storage_stm.c
+++ b/src/stmf0/ao_storage_stm.c
@@ -157,7 +157,7 @@ ao_storage_device_write(uint32_t pos, void *v, uint16_t len)
}
uint8_t
-ao_storage_device_read(uint32_t pos, __xdata void *d, uint16_t len) __reentrant
+ao_storage_device_read(uint32_t pos, void *d, uint16_t len)
{
if (pos >= ao_storage_total || pos + len > ao_storage_total)
return 0;
@@ -166,7 +166,7 @@ ao_storage_device_read(uint32_t pos, __xdata void *d, uint16_t len) __reentrant
}
void
-ao_storage_flush(void) __reentrant
+ao_storage_flush(void)
{
}
@@ -179,7 +179,7 @@ ao_storage_setup(void)
}
void
-ao_storage_device_info(void) __reentrant
+ao_storage_device_info(void)
{
printf ("Using internal flash, page %d bytes, total %d bytes\n",
ao_storage_block, ao_storage_total);
diff --git a/src/stmf0/ao_timer.c b/src/stmf0/ao_timer.c
index 50fd67b8..1def5f69 100644
--- a/src/stmf0/ao_timer.c
+++ b/src/stmf0/ao_timer.c
@@ -36,8 +36,8 @@ ao_time(void)
}
#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/stmf0/ao_usb_stm.c b/src/stmf0/ao_usb_stm.c
index c4860d8e..ff294849 100644
--- a/src/stmf0/ao_usb_stm.c
+++ b/src/stmf0/ao_usb_stm.c
@@ -1626,7 +1626,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 }
};