From ff2750ab07a1fe54cb821a0db79ddac116c205d8 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 19 Sep 2016 15:05:32 +0800 Subject: [PATCH] components/esp32: move peripheral symbols to separate ld script --- components/esp32/component.mk | 2 +- components/esp32/ld/esp32.peripherals.ld | 20 ++++++++++++++++++++ components/esp32/ld/esp32.rom.ld | 23 ----------------------- 3 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 components/esp32/ld/esp32.peripherals.ld diff --git a/components/esp32/component.mk b/components/esp32/component.mk index e7397b2a14..d275898db3 100644 --- a/components/esp32/component.mk +++ b/components/esp32/component.mk @@ -26,7 +26,7 @@ else endif endif -LINKER_SCRIPTS += -T esp32.common.ld -T esp32.rom.ld +LINKER_SCRIPTS += -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld COMPONENT_ADD_LDFLAGS := -lesp32 \ $(abspath libhal.a) \ diff --git a/components/esp32/ld/esp32.peripherals.ld b/components/esp32/ld/esp32.peripherals.ld new file mode 100644 index 0000000000..aaadedce49 --- /dev/null +++ b/components/esp32/ld/esp32.peripherals.ld @@ -0,0 +1,20 @@ +PROVIDE ( UART0 = 0x3ff40000 ); +PROVIDE ( SPI1 = 0x3ff42000 ); +PROVIDE ( SPI0 = 0x3ff43000 ); +PROVIDE ( GPIO = 0x3ff44000 ); +PROVIDE ( SIGMADELTA = 0x3ff44f00 ); +PROVIDE ( UHCI1 = 0x3ff4C000 ); +PROVIDE ( I2S0 = 0x3ff4F000 ); +PROVIDE ( UART1 = 0x3ff50000 ); +PROVIDE ( I2C0 = 0x3ff53000 ); +PROVIDE ( UHCI0 = 0x3ff54000 ); +PROVIDE ( RMT = 0x3ff56000 ); +PROVIDE ( PCNT = 0x3ff57000 ); +PROVIDE ( LEDC = 0x3ff59000 ); +PROVIDE ( TIMERG0 = 0x3ff5F000 ); +PROVIDE ( TIMERG1 = 0x3ff60000 ); +PROVIDE ( SPI2 = 0x3ff64000 ); +PROVIDE ( SPI3 = 0x3ff65000 ); +PROVIDE ( I2C1 = 0x3ff67000 ); +PROVIDE ( I2S1 = 0x3ff6D000 ); +PROVIDE ( UART2 = 0x3ff6E000 ); diff --git a/components/esp32/ld/esp32.rom.ld b/components/esp32/ld/esp32.rom.ld index f8aa70631a..6f9064a398 100644 --- a/components/esp32/ld/esp32.rom.ld +++ b/components/esp32/ld/esp32.rom.ld @@ -1835,26 +1835,3 @@ PROVIDE ( _xtos_syscall_handler = 0x40000790 ); PROVIDE ( _xtos_unhandled_exception = 0x4000c024 ); PROVIDE ( _xtos_unhandled_interrupt = 0x4000c01c ); PROVIDE ( _xtos_vpri_enabled = 0x3ffe0654 ); - -PROVIDE ( I2S0 = 0x3ff4F000 ); -PROVIDE ( I2S1 = 0x3ff6D000 ); -PROVIDE ( GPIO = 0x3ff44000 ); -PROVIDE ( SIGMADELTA = 0x3ff44f00 ); -PROVIDE ( I2C0 = 0x3ff53000 ); -PROVIDE ( I2C1 = 0x3ff67000 ); -PROVIDE ( LEDC = 0x3ff59000 ); -PROVIDE ( PCNT = 0x3ff57000 ); -PROVIDE ( RMT = 0x3ff56000 ); -PROVIDE ( SPI0 = 0x3ff43000 ); -PROVIDE ( SPI1 = 0x3ff42000 ); -PROVIDE ( SPI2 = 0x3ff64000 ); -PROVIDE ( SPI3 = 0x3ff65000 ); -PROVIDE ( TIMERG0 = 0x3ff5F000 ); -PROVIDE ( TIMERG1 = 0x3ff60000 ); -PROVIDE ( UART0 = 0x3ff40000 ); -PROVIDE ( UART1 = 0x3ff50000 ); -PROVIDE ( UART2 = 0x3ff6E000 ); -PROVIDE ( UHCI0 = 0x3ff54000 ); -PROVIDE ( UHCI1 = 0x3ff4C000 ); - -