From cea3ee724e3bae39cf21f91ade7dcc9f776221f9 Mon Sep 17 00:00:00 2001 From: bsongis Date: Fri, 21 Dec 2012 07:35:02 +0000 Subject: [PATCH] [ACT] First simu now compiles. Next step: the keys --- src/Makefile | 56 +++++++------- src/eeprom_arm.cpp | 2 + src/main_views.cpp | 20 ++--- src/menus.cpp | 6 +- src/menus.h | 2 +- src/model_menus.cpp | 24 +++--- src/myeeprom.h | 20 +++-- src/open9x.cpp | 4 +- src/open9x.h | 20 ++--- src/pulses_arm.cpp | 4 +- src/sdcard.h | 4 +- src/simpgmspace.cpp | 4 +- src/simpgmspace.h | 2 +- src/simu.cpp | 14 +++- src/sky9x/audio.cpp | 4 +- src/sky9x/audio.h | 5 ++ src/x9d/stm32_flash.ld | 171 +++++++++++++++++++++++++++++++++++++++++ 17 files changed, 277 insertions(+), 85 deletions(-) create mode 100644 src/x9d/stm32_flash.ld diff --git a/src/Makefile b/src/Makefile index 79f32b6f9..0da13064a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -50,7 +50,7 @@ DELAY = 5 #----------- BUILD OPTIONS --------------------------- # PCB version -# Values: STD, STD128, GRUVIN9X, SKY9X, X9D +# Values: STD, STD128, GRUVIN9X, SKY9X, X9D, ACT PCB = STD # PCB revision @@ -268,7 +268,14 @@ endif ifeq ($(PCB), X9D) ARCH = ARM - LDSCRIPT = sky9x/sam3s4c_flash.ld + LDSCRIPT = x9d/stm32_flash.ld + TRGT = arm-none-eabi- + MCU = cortex-m3 +endif + +ifeq ($(PCB), ACT) + ARCH = ARM + LDSCRIPT = x9d/stm32_flash.ld TRGT = arm-none-eabi- MCU = cortex-m3 endif @@ -458,39 +465,23 @@ endif RUN_FROM_FLASH = 1 ifeq ($(PCB), ACT) - # ACT, so ... + # ACT radio OPT = 2 - CPPDEFS += -DPCBACT -DCPUARM -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC -DPXX -DDSM2 -DDSM2_PPM -DROTARY_ENCODERS=1 -DLCD260 + CPPDEFS += -DPCBACT -DCPUARM -DEEPROM_VARIANT=0 -DAUDIO -DPXX -DDSM2 -DDSM2_PPM -DROTARY_ENCODERS=1 -DLCD260 EXTRAINCDIRS += sky9x CoOS/kernel CoOS/portable EXTRAINCDIRS += x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include BOARDSRC = board_x9d.cpp EXTRABOARDSRC += x9d/lcd_driver.cpp - SRC += sky9x/core_cm3.c sky9x/board_lowlevel.c sky9x/crt.c sky9x/vectors_sam3s.c -# SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c -# SRC += sky9x/usb/device/core/USBD_UDP.c sky9x/usb/device/core/USBDDriver.c -# SRC += sky9x/usb/device/massstorage/MSDDriver.c sky9x/usb/device/massstorage/MSDDStateMachine.c sky9x/usb/device/massstorage/MSDLun.c sky9x/usb/device/massstorage/MSDDriverDescriptors.c sky9x/usb/device/massstorage/SBCMethods.c -# SRC += sky9x/usb/common/core/USBEndpointDescriptor.c sky9x/usb/common/core/USBGenericRequest.c sky9x/usb/common/core/USBFeatureRequest.c sky9x/usb/common/core/USBInterfaceRequest.c sky9x/usb/common/core/USBGetDescriptorRequest.c sky9x/usb/common/core/USBSetAddressRequest.c sky9x/usb/common/core/USBSetConfigurationRequest.c sky9x/usb/common/core/USBConfigurationDescriptor.c sky9x/usb/common/core/USBGenericDescriptor.c -# SRC += sky9x/MEDSdcard.c + SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c EEPROMSRC = eeprom_arm.cpp eeprom_conversions.cpp + CPPSRC += x9d/eeprom_driver.cpp x9d/pulses_driver.cpp x9d/keys_driver.cpp x9d/audio_driver.cpp + CPPSRC += sky9x/audio.cpp PULSESSRC = pulses_arm.cpp -# CPPSRC += sky9x/audio.cpp haptic.cpp -# CPPSRC += sky9x/sound_driver.cpp sky9x/sdcard_driver.cpp - CPPSRC += bmp.cpp monitors_views.cpp - - ifeq ($(SDCARD), YES) - EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c # sky9x/diskio.cpp - CPPDEFS += -DVOICE - EXTRAINCDIRS += FatFs FatFs/option - endif - - ifeq ($(DEBUG), YES) - CPPSRC += sky9x/debug.cpp - SRC += sky9x/syscalls.c - endif + CPPSRC += monitors_views.cpp endif ifeq ($(PCB), X9D) - # X9D, so ... + # X9D radio OPT = 2 CPPDEFS += -DPCBX9D -DCPUARM -DEEPROM_VARIANT=0 -DAUDIO -DPXX -DDSM2 -DDSM2_PPM -DROTARY_ENCODERS=1 -DLCD212 EXTRAINCDIRS += sky9x CoOS/kernel CoOS/portable @@ -519,7 +510,7 @@ ifeq ($(PCB), X9D) endif ifeq ($(PCB), SKY9X) - # SKY9X, so ... + # 9x radio with a sky9x replacement board OPT = 2 CPPDEFS += -DPCBSKY9X -DCPUARM -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC -DPXX -DDSM2 -DDSM2_PPM -DROTARY_ENCODERS=1 EXTRAINCDIRS += sky9x CoOS/kernel CoOS/portable @@ -559,7 +550,7 @@ ifeq ($(PCB), SKY9X) endif ifeq ($(PCB), GRUVIN9X) - # Gruvin9x PCB, so ... + # 9x radio with a gruvin9x replacement board OPT = 2 CPPDEFS += -DPCBGRUVIN9X -DEEPROM_VARIANT=0 -DAUDIO -DHAPTIC -DROTARY_ENCODERS=2 EXTRAINCDIRS += gruvin9x stock FatFs FatFs/option @@ -586,7 +577,7 @@ ifeq ($(PCB), GRUVIN9X) endif ifeq ($(PCB), STD128) - # STD PCB with Atmega 128, so ... + # 9x radio with Atmega 64 replace by Atmega 128 OPT = 2 CPPDEFS += -DPCBSTD -DCPUM128 -DEEPROM_VARIANT=0x8000 EXTRAINCDIRS += stock @@ -622,7 +613,7 @@ ifeq ($(PCB), STD128) endif ifeq ($(PCB), STD) - # STD PCB, so ... + # 9x radio OPT = s EXTRAINCDIRS += stock CPPDEFS += -DPCBSTD -DCPUM64 -DEEPROM_VARIANT=$(shell echo ${EEPROM_VARIANT} | bc) @@ -801,7 +792,7 @@ eep: $(TARGET).eep lss: $(TARGET).lss sym: $(TARGET).sym -lbm: font.lbm font_tiny.lbm font_small.lbm font_midsize.lbm font_dblsize.lbm sticks.lbm splash_9x.lbm splash_X9D.lbm asterisk.lbm +lbm: font.lbm font_tiny.lbm font_small.lbm font_midsize.lbm font_dblsize.lbm sticks.lbm splash_9x.lbm splash_X9D.lbm splash_ACT.lbm asterisk.lbm # Build stamp-file stamp_header: @@ -890,6 +881,11 @@ splash_X9D.lbm: splash_X9D.xbm @echo "Convert X9D splash from xbm to lbm:" $(IMG2LBM) $< $@ img +splash_ACT.lbm: splash_ACT.xbm + @echo + @echo "Convert ACT splash from xbm to lbm:" + $(IMG2LBM) $< $@ img + asterisk.lbm: asterisk.xbm @echo @echo "Convert asterisk from xbm to lbm:" diff --git a/src/eeprom_arm.cpp b/src/eeprom_arm.cpp index 3401bfe1c..a4dc56c3c 100644 --- a/src/eeprom_arm.cpp +++ b/src/eeprom_arm.cpp @@ -425,7 +425,9 @@ void eeLoadModel(uint8_t id) FRSKY_setModelAlarms(); #endif +#if defined(SDCARD) refreshModelAudioFiles(); +#endif LOAD_MODEL_BITMAP(); } diff --git a/src/main_views.cpp b/src/main_views.cpp index bb101bd33..32b47c7fa 100644 --- a/src/main_views.cpp +++ b/src/main_views.cpp @@ -33,7 +33,7 @@ #include "open9x.h" -#if defined(LCD212) +#if defined(LCD212) || defined(LCD260) #define BOX_WIDTH 31 #define LBOX_CENTERX (BOX_WIDTH/2 + 17) #define LBOX_CENTERY (DISPLAY_H-BOX_WIDTH/2-10) @@ -158,7 +158,7 @@ void displayTrims(uint8_t phase) } } -#if defined(PCBX9D) +#if defined(PCBX9D) || defined(PCBACT) void displaySliders() { for (uint8_t i=NUM_STICKS; i0 && m_posHorz0 && iTC_CHANNEL[0].TC_CV; } @@ -932,7 +932,7 @@ extern void backlightOn(); void read_9_adc(void); #endif -#if defined(PCBX9D) +#if defined(PCBX9D) || defined(PCBACT) #define __BACKLIGHT_ON #define __BACKLIGHT_OFF #elif defined (PCBSKY9X) @@ -1363,7 +1363,7 @@ char * strcat_zchar(char * dest, char * name, uint8_t size, const char *defaultN #define ZLEN(s) zlen(s, sizeof(s)) #endif -#if defined(PCBX9D) +#if defined(PCBX9D) || defined(PCBACT) #define KEY_MOVE_UP KEY_MINUS #define KEY_MOVE_DOWN KEY_PLUS #else diff --git a/src/pulses_arm.cpp b/src/pulses_arm.cpp index cd1761366..ee7011db0 100644 --- a/src/pulses_arm.cpp +++ b/src/pulses_arm.cpp @@ -67,7 +67,7 @@ void startPulses() void setupPulsesPPM() // Don't enable interrupts through here { -#if !defined(PCBX9D) +#if !defined(PCBX9D) && !defined(PCBACT) register Pwm *pwmptr = PWM; #endif @@ -82,7 +82,7 @@ void setupPulsesPPM() // Don't enable interrupts through here ptr = Pulses; uint32_t p = 8 + g_model.ppmNCH * 2; //Channels *2 -#if !defined(PCBX9D) +#if !defined(PCBX9D) && !defined(PCBACT) pwmptr->PWM_CH_NUM[3].PWM_CDTYUPD = (g_model.ppmDelay * 50 + 300) * 2; //Stoplen *2 if (g_model.pulsePol) pwmptr->PWM_CH_NUM[3].PWM_CMR |= 0x00000200 ; // CPOL diff --git a/src/sdcard.h b/src/sdcard.h index 46ab58e30..828111f43 100644 --- a/src/sdcard.h +++ b/src/sdcard.h @@ -88,7 +88,9 @@ extern uint32_t sd_card_mounted(); #define sd_card_mounted() (true) #endif -#if defined(PCBX9D) +#if defined(PCBACT) +#define O9X_FOURCC 0x3478396F // o9x for ACT +#elif defined(PCBX9D) #define O9X_FOURCC 0x3378396F // o9x for X9D #elif defined(PCBSKY9X) #define O9X_FOURCC 0x3278396F // o9x for sky9x diff --git a/src/simpgmspace.cpp b/src/simpgmspace.cpp index 33a46d850..458e40eb9 100644 --- a/src/simpgmspace.cpp +++ b/src/simpgmspace.cpp @@ -43,7 +43,7 @@ uint16_t dummyport16; const char *eepromFile = NULL; FILE *fp = NULL; -#if defined(PCBX9D) +#if defined(PCBX9D) || defined(PCBACT) GPIO_TypeDef gpiob; GPIO_TypeDef gpioc; #elif defined(PCBSKY9X) @@ -92,7 +92,7 @@ sem_t *eeprom_write_sem; void setSwitch(int8_t swtch) { switch (swtch) { -#if defined(PCBX9D) +#if defined(PCBX9D) || defined(PCBACT) case DSW(SW_SA0): GPIOB->IDR &= ~(1<<31); break; diff --git a/src/simpgmspace.h b/src/simpgmspace.h index af09db075..8e53f440a 100644 --- a/src/simpgmspace.h +++ b/src/simpgmspace.h @@ -95,7 +95,7 @@ typedef const uint8_t pm_uint8_t; typedef const int16_t pm_int16_t; typedef const int8_t pm_int8_t; -#if defined(PCBX9D) +#if defined(PCBX9D) || defined(PCBACT) extern GPIO_TypeDef gpiob; #undef GPIOB #define GPIOB (&gpiob) diff --git a/src/simu.cpp b/src/simu.cpp index e75c75897..8cf42c761 100644 --- a/src/simu.cpp +++ b/src/simu.cpp @@ -49,12 +49,14 @@ int g_snapshot_idx = 0; uint64_t toto = 0; -#if defined(PCBX9D) +#if defined(PCBX9D) || defined(PCBACT) #define ERSKY9X_RETURN_PIO GPIOC->IDR #define ERSKY9X_RETURN_MASK 0x20 #define ERSKY9X_EXIT_PIO GPIOC->IDR #define ERSKY9X_EXIT_MASK (0x01000000) +#define ERSKY9X_UP_PIO GPIOC->IDR #define ERSKY9X_UP_MASK 0x00 +#define ERSKY9X_DOWN_PIO GPIOC->IDR #define ERSKY9X_DOWN_MASK 0x00 #define ERSKY9X_RIGHT_PIO GPIOC->IDR #define ERSKY9X_RIGHT_MASK 0x10 @@ -69,9 +71,11 @@ uint64_t toto = 0; #define ERSKY9X_RETURN_MASK (0x40) #define ERSKY9X_EXIT_PIO PIOA->PIO_PDSR #define ERSKY9X_EXIT_MASK (0x80000000) +#define ERSKY9X_UP_PIO PIOC #define ERSKY9X_UP_MASK (0x08 >> 1) #define ERSKY9X_RIGHT_PIO PIOC->PIO_PDSR #define ERSKY9X_RIGHT_MASK (0x20 >> 1) +#define ERSKY9X_DOWN_PIO PIOC->PIO_PDSR #define ERSKY9X_DOWN_MASK (0x10 >> 1) #define ERSKY9X_LEFT_PIO PIOC->PIO_PDSR #define ERSKY9X_LEFT_MASK (0x40 >> 1) @@ -80,9 +84,11 @@ uint64_t toto = 0; #define ERSKY9X_RETURN_MASK (0x20) #define ERSKY9X_EXIT_MASK (0x01000000) #define ERSKY9X_EXIT_PIO PIOC->PIO_PDSR +#define ERSKY9X_UP_PIO PIOC #define ERSKY9X_UP_MASK (0x04 >> 1) #define ERSKY9X_RIGHT_PIO PIOC->PIO_PDSR #define ERSKY9X_RIGHT_MASK (0x20 >> 1) +#define ERSKY9X_DOWN_PIO PIOC->PIO_PDSR #define ERSKY9X_DOWN_MASK (0x40 >> 1) #define ERSKY9X_LEFT_PIO PIOC->PIO_PDSR #define ERSKY9X_LEFT_MASK (0x10 >> 1) @@ -93,9 +99,11 @@ uint64_t toto = 0; #define ERSKY9X_RETURN_MASK toto #define ERSKY9X_EXIT_MASK toto #define ERSKY9X_EXIT_PIO toto +#define ERSKY9X_UP_PIO toto #define ERSKY9X_UP_MASK toto #define ERSKY9X_RIGHT_PIO toto #define ERSKY9X_RIGHT_MASK toto +#define ERSKY9X_DOWN_PIO toto #define ERSKY9X_DOWN_MASK toto #define ERSKY9X_LEFT_PIO toto #define ERSKY9X_LEFT_MASK toto @@ -304,8 +312,8 @@ long Open9xSim::onTimeout(FXObject*,FXSelector,void*) KEY_Page_Up, INP_B_KEY_MEN, INP_L_KEY_MEN, (uint64_t)&KEY_MENU_PIO, KEY_MENU_MASK, KEY_Page_Down, INP_B_KEY_EXT, INP_L_KEY_EXT, (uint64_t)&KEY_PAGE_PIO, KEY_PAGE_MASK, #else - KEY_Up, INP_B_KEY_UP, INP_L_KEY_UP, (uint64_t)PIOC, ERSKY9X_UP_MASK, - KEY_Down, INP_B_KEY_DWN, INP_L_KEY_DWN, (uint64_t)PIOC, ERSKY9X_DOWN_MASK, + KEY_Up, INP_B_KEY_UP, INP_L_KEY_UP, (uint64_t)&ERSKY9X_UP_PIO, ERSKY9X_UP_MASK, + KEY_Down, INP_B_KEY_DWN, INP_L_KEY_DWN, (uint64_t)&ERSKY9X_DOWN_PIO, ERSKY9X_DOWN_MASK, #endif }; diff --git a/src/sky9x/audio.cpp b/src/sky9x/audio.cpp index 35290b1d3..4f3f3e5b8 100644 --- a/src/sky9x/audio.cpp +++ b/src/sky9x/audio.cpp @@ -428,7 +428,7 @@ void AudioQueue::wakeup() if (state != AUDIO_PLAYING_TONE) { state = AUDIO_PLAYING_TONE; -#if !defined(PCBX9D) +#if !defined(PCBX9D) && !defined(PCBACT) register Dacc *dacptr = DACC; dacptr->DACC_TPR = CONVERT_PTR(Sine_values); dacptr->DACC_TNPR = CONVERT_PTR(Sine_values); @@ -474,7 +474,7 @@ void AudioQueue::wakeup() else if (ridx == widx && prioIdx < 0 && backgroundContext.fragment.duration > 0) { if (state != AUDIO_PLAYING_TONE) { state = AUDIO_PLAYING_TONE; -#if !defined(PCBX9D) +#if !defined(PCBX9D) && !defined(PCBACT) register Dacc *dacptr = DACC; dacptr->DACC_TPR = CONVERT_PTR(Sine_values); dacptr->DACC_TNPR = CONVERT_PTR(Sine_values); diff --git a/src/sky9x/audio.h b/src/sky9x/audio.h index 4c0366ca2..c27699c4d 100644 --- a/src/sky9x/audio.h +++ b/src/sky9x/audio.h @@ -190,8 +190,13 @@ extern void pushPrompt(uint16_t prompt, uint8_t id=0); #define PLAY_FILE(f, flags, id) audioQueue.playFile((f), (flags), (id)) #define STOP_PLAY(id) audioQueue.stopPlay((id)) #define AUDIO_RESET() audioQueue.reset() +#if defined(SDCARD) #define PLAY_PHASE_OFF(phase) do { char filename[64]; if (isAudioFileAvailable((PHASE_AUDIO_CATEGORY << 24) + (phase << 16) + AUDIO_EVENT_OFF, filename)) audioQueue.playFile(filename); } while (0) #define PLAY_PHASE_ON(phase) do { char filename[64]; if (isAudioFileAvailable((PHASE_AUDIO_CATEGORY << 24) + (phase << 16) + AUDIO_EVENT_ON, filename)) audioQueue.playFile(filename); } while (0) +#else +#define PLAY_PHASE_OFF(phase) +#define PLAY_PHASE_ON(phase) +#endif extern void refreshSystemAudioFiles(); extern void refreshModelAudioFiles(); diff --git a/src/x9d/stm32_flash.ld b/src/x9d/stm32_flash.ld new file mode 100644 index 000000000..9e297a396 --- /dev/null +++ b/src/x9d/stm32_flash.ld @@ -0,0 +1,171 @@ +/* +***************************************************************************** +** +** File : stm32_flash.ld +** +** Abstract : Linker script for STM32F207IG Device with +** 1MByte FLASH, 128KByte SRAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Environment : Atollic TrueSTUDIO(R) +** +** Distribution: The file is distributed “as is,” without any warranty +** of any kind. +** +** (c)Copyright Atollic AB. +** You may use this file as-is or modify it according to the needs of your +** project. Distribution of this file (unmodified or modified) is not +** permitted. Atollic AB permit registered Atollic TrueSTUDIO(R) users the +** rights to distribute the assembled, compiled & linked contents of this +** file as part of an application binary file, provided that it is built +** using the Atollic TrueSTUDIO(R) toolchain. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20020000; /* end of 128K SRAM */ + +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0; /* required amount of heap */ +_Min_Stack_Size = 0x200; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K + MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(.fini_array*)) + KEEP (*(SORT(.fini_array.*))) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = .; + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : AT ( _sidata ) + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + PROVIDE ( end = _ebss ); + PROVIDE ( _end = _ebss ); + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(4); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(4); + } >RAM + + /* MEMORY_bank1 section, code must be located here explicitly */ + /* Example: extern int foo(void) __attribute__ ((section (".mb1text"))); */ + .memory_b1_text : + { + *(.mb1text) /* .mb1text sections (code) */ + *(.mb1text*) /* .mb1text* sections (code) */ + *(.mb1rodata) /* read-only data (constants) */ + *(.mb1rodata*) + } >MEMORY_B1 + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +}