summaryrefslogtreecommitdiff
path: root/src/lpc
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-08-15 17:47:37 -0700
committerKeith Packard <keithp@keithp.com>2018-10-13 08:22:50 -0700
commitc6e57291d91f1f6c4de5c54a5cfd3eef66d9f830 (patch)
tree1fb7753fad10c6897906baec11d2f5756a9bb866 /src/lpc
parent6023ff81f1bbd240169b9548209133d3b02d475f (diff)
altos: Remove 8051 address space specifiers
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc')
-rw-r--r--src/lpc/altos-loader.ld4
-rw-r--r--src/lpc/altos-standalone.ld4
-rw-r--r--src/lpc/altos.ld4
-rw-r--r--src/lpc/ao_adc_lpc.c4
-rw-r--r--src/lpc/ao_arch.h5
-rw-r--r--src/lpc/ao_beep_lpc.c2
-rw-r--r--src/lpc/ao_interrupt.c4
-rw-r--r--src/lpc/ao_led_lpc.c4
-rw-r--r--src/lpc/ao_timer_lpc.c6
-rw-r--r--src/lpc/ao_usb_lpc.c2
10 files changed, 17 insertions, 22 deletions
diff --git a/src/lpc/altos-loader.ld b/src/lpc/altos-loader.ld
index 84d7610c..be4f115d 100644
--- a/src/lpc/altos-loader.ld
+++ b/src/lpc/altos-loader.ld
@@ -61,9 +61,9 @@ SECTIONS {
/* Data -- relocated to RAM, but written to ROM
*/
.data : {
- __data_start__ = .;
+ _start__ = .;
*(.data*) /* initialized data */
- __data_end__ = .;
+ _end__ = .;
} >ram AT>rom
diff --git a/src/lpc/altos-standalone.ld b/src/lpc/altos-standalone.ld
index db53dcaf..99d10149 100644
--- a/src/lpc/altos-standalone.ld
+++ b/src/lpc/altos-standalone.ld
@@ -65,9 +65,9 @@ SECTIONS {
/* Data -- relocated to RAM, but written to ROM
*/
.data ORIGIN(ram) : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) {
- __data_start__ = .;
+ _start__ = .;
*(.data) /* initialized data */
- __data_end__ = .;
+ _end__ = .;
__bss_start__ = .;
} >ram
diff --git a/src/lpc/altos.ld b/src/lpc/altos.ld
index e6a6a7ed..028ad775 100644
--- a/src/lpc/altos.ld
+++ b/src/lpc/altos.ld
@@ -69,9 +69,9 @@ SECTIONS {
/* Data -- relocated to RAM, but written to ROM
*/
.data : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) {
- __data_start__ = .;
+ _start__ = .;
*(.data) /* initialized data */
- __data_end__ = .;
+ _end__ = .;
__bss_start__ = .;
} >ram
diff --git a/src/lpc/ao_adc_lpc.c b/src/lpc/ao_adc_lpc.c
index 26a5ea08..6743c1f4 100644
--- a/src/lpc/ao_adc_lpc.c
+++ b/src/lpc/ao_adc_lpc.c
@@ -147,7 +147,7 @@ ao_adc_poll(void)
}
static void
-ao_adc_dump(void) __reentrant
+ao_adc_dump(void)
{
struct ao_data packet;
#ifndef AO_ADC_DUMP
@@ -167,7 +167,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/lpc/ao_arch.h b/src/lpc/ao_arch.h
index f1df14eb..889be53e 100644
--- a/src/lpc/ao_arch.h
+++ b/src/lpc/ao_arch.h
@@ -42,11 +42,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/lpc/ao_beep_lpc.c b/src/lpc/ao_beep_lpc.c
index b1211752..eab86ee6 100644
--- a/src/lpc/ao_beep_lpc.c
+++ b/src/lpc/ao_beep_lpc.c
@@ -59,7 +59,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/lpc/ao_interrupt.c b/src/lpc/ao_interrupt.c
index 3e0119c6..8d71f43f 100644
--- a/src/lpc/ao_interrupt.c
+++ b/src/lpc/ao_interrupt.c
@@ -32,7 +32,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__;
@@ -61,7 +61,7 @@ void start(void) {
memcpy(&__interrupt_start__, &__interrupt_rom__, &__interrupt_end__ - &__interrupt_start__);
lpc_scb.sysmemremap = LPC_SCB_SYSMEMREMAP_MAP_RAM << LPC_SCB_SYSMEMREMAP_MAP;
#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/lpc/ao_led_lpc.c b/src/lpc/ao_led_lpc.c
index 2d2c3972..5fc726c0 100644
--- a/src/lpc/ao_led_lpc.c
+++ b/src/lpc/ao_led_lpc.c
@@ -18,7 +18,7 @@
#include <ao.h>
-__pdata AO_PORT_TYPE ao_led_enable;
+AO_PORT_TYPE ao_led_enable;
void
ao_led_on(AO_PORT_TYPE colors)
@@ -49,7 +49,7 @@ ao_led_toggle(AO_PORT_TYPE colors)
}
void
-ao_led_for(AO_PORT_TYPE colors, uint16_t ticks) __reentrant
+ao_led_for(AO_PORT_TYPE colors, uint16_t ticks)
{
ao_led_on(colors);
ao_delay(ticks);
diff --git a/src/lpc/ao_timer_lpc.c b/src/lpc/ao_timer_lpc.c
index 166e2f15..8999c7ac 100644
--- a/src/lpc/ao_timer_lpc.c
+++ b/src/lpc/ao_timer_lpc.c
@@ -18,7 +18,7 @@
#include <ao.h>
-volatile __data AO_TICK_TYPE ao_tick_count;
+volatile AO_TICK_TYPE ao_tick_count;
uint16_t
ao_time(void)
@@ -27,8 +27,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 lpc_systick_isr(void)
diff --git a/src/lpc/ao_usb_lpc.c b/src/lpc/ao_usb_lpc.c
index d26a1437..5cd7aa59 100644
--- a/src/lpc/ao_usb_lpc.c
+++ b/src/lpc/ao_usb_lpc.c
@@ -1003,7 +1003,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 }
};