Browse Source

Revert "Add support for using UART bootloader"

This reverts commit 5f2a36d07f.
master
arturo182 3 years ago
parent
commit
85ffe1867a
4 changed files with 4 additions and 353 deletions
  1. +4
    -14
      Makefile
  2. +0
    -127
      bootloader-tinygecko.hex
  3. +0
    -207
      lib/GeckoSDK/Device/SiliconLabs/EFM32TG/Source/GCC/efm32tg-bl.ld
  4. +0
    -5
      src/main.c

+ 4
- 14
Makefile View File

@@ -1,18 +1,12 @@

.SUFFIXES:
.PHONY: all clean flash flash-bootloader debug
.PHONY: all

CROSS_COMPILE ?= arm-none-eabi-
CC := $(CROSS_COMPILE)gcc
LD := $(CROSS_COMPILE)ld
OBJCOPY := $(CROSS_COMPILE)objcopy

ifeq ($(STANDALONE),1)
LINKER_SCRIPT_NAME := efm32tg.ld
else
LINKER_SCRIPT_NAME := efm32tg-bl.ld
CFLAGS += -DUSE_BOOTLOADER
endif

PROJECTNAME=template
SOURCES := main.c hw_pinout.c
@@ -20,7 +14,7 @@ SOURCES := main.c hw_pinout.c
GECKO_SDK_PATH := lib/GeckoSDK
EFM_DEVICE_PATH := $(GECKO_SDK_PATH)/Device/SiliconLabs/EFM32TG
DEVICE_SOURCES := system_efm32tg.c GCC/startup_efm32tg.c
LINKER_SCRIPT := $(EFM_DEVICE_PATH)/Source/GCC/$(LINKER_SCRIPT_NAME)
LINKER_SCRIPT := $(EFM_DEVICE_PATH)/Source/GCC/efm32tg.ld
EMLIB_PATH := $(GECKO_SDK_PATH)/emlib
EMLIB_SRC_PATH := $(EMLIB_PATH)/src
CMSIS_PATH := $(GECKO_SDK_PATH)/CMSIS
@@ -42,13 +36,13 @@ VPATH = .:src:$(EMLIB_SRC_PATH):$(EMLIB_DEVICE_PATH):$(EFM_DEVICE_PATH)/Source
INCLUDE_DIRS := inc $(EFM_DEVICE_PATH)/Include $(EMLIB_PATH)/inc \
$(CMSIS_PATH)/Include

CFLAGS += -Wall -Wextra -mcpu=cortex-m3 -mthumb \
CFLAGS := -Wall -Wextra -mcpu=cortex-m3 -mthumb \
-mfix-cortex-m3-ldrd -ffunction-sections \
-fdata-sections -fomit-frame-pointer -std=c99 \
-DEFM32TG110F32 \
$(addprefix -I, $(INCLUDE_DIRS))

LDFLAGS += -Xlinker -Map=$(PROJECTNAME).map -mcpu=cortex-m3 -mthumb \
LDFLAGS := -Xlinker -Map=$(PROJECTNAME).map -mcpu=cortex-m3 -mthumb \
-T$(LINKER_SCRIPT)
LIBS := -Wl,--gc-sections \
-Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group
@@ -80,7 +74,3 @@ debug:
flash: $(PROJECTNAME).elf
openocd -f interface/stlink-v2.cfg -f target/efm32.cfg \
-c 'init; program $(PROJECTNAME).elf verify reset exit ;'

flash-bootloader: bootloader-tinygecko.hex
openocd -f interface/stlink-v2.cfg -f target/efm32.cfg \
-c 'init; program $< verify reset exit' ;

+ 0
- 127
bootloader-tinygecko.hex View File

@@ -1,127 +0,0 @@
:10000000B00200208D030000DFF800F0870500201B
:10001000DFF800F011040020DFF800F04B060020AC
:10002000DFF800F0FF050020DFF800F08704002073
:1000300083482021016083494A68052A07D2C06AA3
:100040004A6801EB820290604868401C4860704733
:1000500070B54FF0FF3200200021012308E004EBCF
:100060008304A56864682D1B954298BF2A465B1CD3
:10007000744C6568AB42F2D301230BE004EB8305BB
:10008000AE686D68751B02EB5206B5423CBF28187E
:10009000491C5B1C6568AB42F0D3C001B0FBF1F0BA
:1000A00070BD6948072101606648007810B1674853
:1000B0006749016070472DE9F0474FF000506549EE
:1000C00081666549C0F88410644C20604FF400617B
:1000D0000020FFF799FF62490880624E4FF480705C
:1000E00030606420F0630620B0634020B0610D20D2
:1000F0003062022030655C4DA87F472808D049282F
:1001000006D0482814BF4FF400604FF4805001E03F
:100110004FF40070DFF82C91C9F81C00534F0720F2
:10012000B8614FF40050B8600220F861DFF840A1D8
:100130004FF40038CAF80080072038600CE0042033
:10014000D0F80008B0F5801F38BFFFF761FFA06846
:1001500040F00400A06030BF4648816BC907EED56F
:100160004FF47021B960012189F800102968C1F3AA
:10017000072141F4A0617160716A8907FCD54FF4D1
:10018000806141604FF4A05101603B484FF0FF3166
:1001900081610121C1633949416240F20241CAF8DB
:1001A00000102022826001220260A26822F0040274
:1001B000A26000E030BFD9F80420052AFAD3304C01
:1001C000216000214162FFF743FFC4F80080A0F5E1
:1001D000805109092B4A40F6B833994206D2A0F55E
:1001E00080608108106840F0600010605161032059
:1001F00050654FF44060D0600520D0600FF294004D
:10020000FFF70AFF6869FFF70BFF2869FFF708FF90
:100210000AA0FFF701FF1C4841F6713141630168F4
:1002200041F0010101601948012101601849416054
:10023000FFF7FAFE0020BDE8F08700000D0A00007D
:1002400018040140B0020020180008400CED00E046
:100250000400FA0531000000A300000008ED00E0F2
:10026000BC00002008800C40E081E00F0000084046
:1002700000E100E098600040040401400200010039
:1002800080E100E000C0004008000C4004200C4069
:10029000000100200D0A0D0A312E36302043686916
:1002A0007049443A2000000010B450F8041B81B19A
:1002B00002681218001D50F8043BDC0744BFA9F186
:1002C0000104E31852F8044B43F8044B091FF9D119
:1002D000EBE710BC704750F8041B61B150F8042BD9
:1002E000D30744BFA9F101039A18002342F8043B45
:1002F000091FFAD1EFE7704710B5084979441C315E
:10030000074C7C441A34A14206D0081D0A685118D3
:1003100088470146A142F8D110BD00BF0800000087
:1003200034000000B3FFFFFF30010000B0020020E6
:100330000000000075FFFFFF280000005C000000C7
:10034000C00000200804000078000000E003002046
:10035000000000000120C046002801D0FFF7CCFFBC
:100360000020FFF7A8FE00F000F880B500F002F8CA
:1003700000BF00000746384600F002F8FBE7000027
:1003800001491820ABBEFBE726000200C046C0466C
:10039000C046C046FFF7DEFF0D0A52656164790D65
:1003A0000A0000000D0A4F4B0D0A00000D0A4661BD
:1003B000696C0D0A000000000D0A3F0D0A000000E4
:1003C000FFFFFFFFFFFFFF0000A50000000000A9E6
:1003D000000000000A0000000D0A4352433A2000CA
:1003E0000D0A000080F3088880F309888F46704763
:1003F000DFF874034FF0FF3101604160DFF86C03F8
:10040000002101608160C161DFF864030160DFF8F1
:1004100064030165052101628021816100218163FE
:100420004FF4807101600021C163DFF84C034FF489
:10043000006101600420D0F800184FF400600068EB
:10044000D0E770B504460D46CC4E304600F0EDF8CE
:100450002946204600F087F800F0C1F806F10800B0
:10046000BDE87040E1E02DE9F047C54800680004B0
:100470008409C44DC44EDFF814A3DFF81483DFF8F9
:10048000149306E000F06DF821464FF4006000F090
:10049000D7F800F0B6F80746002FFAD000F0BFF802
:1004A000002FF6D0622F26D0632F48D0642F10D0B3
:1004B0006C2F23D06D2F4AD06E2F44D0702F13D0C5
:1004C000722F47D0742F09D0752FDBD0762F31D003
:1004D00044E000F046F821460020D8E700F041F85B
:1004E00051464FF07E60D2E700F055F800F039F841
:1004F00049464046CBE7FFF77BFFCAE700F04BF8E1
:10050000A5480068C007FBD4A44870600120306093
:100510000020F060082030603069C007FCD49F489C
:10052000006800280CBF05F20C0005F2140000F072
:100530007CF8AEE721460020FFF783FFA9E72146BC
:100540004FF40060F8E751464FF07E60F4E749460B
:100550004046F1E79248934901609AE705F120008F
:10056000E5E7284661E0002211E01346120242EA64
:10057000132210F8013B5A4092B2131103F00F03FB
:100580005A4082EA023292B2D3B282EA43128842DD
:10059000EBD31046704710B57548002101608166A5
:1005A000814A00238C5C1C41E407846E4CBF44F0FC
:1005B000020424F002048466846E44F0010484661C
:1005C00001240460846E640864008466002404606E
:1005D0005B1C082BE6DB491C1529E2D310BD38B59E
:1005E00004460725A80024FA00F000F00F000A28AE
:1005F00034BF30303730C0B200F011F86D1EF1D585
:1006000031BD6A486A490A68120603D4401EFAD10D
:10061000002070470028FBD0C868C0B2704764490A
:100620000A685206FCD54862704710B5044603E0DC
:1006300014F8010BFFF7F3FF20780028F8D110BD64
:100640002DE9F047814601274F4DDFF868A114E0FE
:1006500053F8044B2240DAF81CC084446345F7D3B6
:1006600012F1010F06D068602F6002222A602A6909
:10067000D207FCD4DAF81C20101888423CBF4FF097
:10068000FF320346E7D34320FFF7C9FF4A484849F2
:100690000968090605D4401EF9D1F4E71520FFF7D3
:1006A000BEFF07F00100882101FB00A000F120043B
:1006B000FFF7A7FF6070DFF8E080042809D106206B
:1006C000FFF7ADFFD8F80000C007FBD40020BDE85D
:1006D000F087012818BF4FF0FF30F8D10226FFF74E
:1006E00090FF3055761C862EF9D3611C4A788B78A2
:1006F0009A1892B2FF2AD1D14978FA1107EB126207
:100700001212A7EB02208142C8D104F284063146BE
:10071000201DFFF728FF94F88410727842EA012127
:100720008842BBD1201D791ED8F80030DB07FBD4EE
:1007300009EBC111696001212960204905F20C0211
:100740004A6000F27C020A601D4A8A601D494FF42B
:1007500040120A600068E8600120C8F8000010201C
:1007600028607F1C06209AE780E100E00000084036
:10077000B860004008800C4008ED00E0F80300205D
:10078000F881E00FC00000200C000C400002E00FD8
:100790000040E00F0042E00F28200C40FC41E00F39
:1007A0000CED00E00400FA05E003002040420F00D9
:1007B00010C00040B0020020809698000001002088
:0807C000E10100EA00310C40E8
:040000050000038D67
:00000001FF

+ 0
- 207
lib/GeckoSDK/Device/SiliconLabs/EFM32TG/Source/GCC/efm32tg-bl.ld View File

@@ -1,207 +0,0 @@
/* Linker script for Silicon Labs EFM32TG devices */
/* */
/* This file is subject to the license terms as defined in ARM's */
/* CMSIS END USER LICENSE AGREEMENT.pdf, governing the use of */
/* Example Code. */
/* */
/* Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com */
/* */
/* Version 4.4.0 */
/* */
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000800, LENGTH = 30720
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 4096
}
/* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM.
* It references following symbols, which must be defined in code:
* Reset_Handler : Entry of reset handler
*
* It defines following symbols, which code can use without definition:
* __exidx_start
* __exidx_end
* __copy_table_start__
* __copy_table_end__
* __zero_table_start__
* __zero_table_end__
* __etext
* __data_start__
* __preinit_array_start
* __preinit_array_end
* __init_array_start
* __init_array_end
* __fini_array_start
* __fini_array_end
* __data_end__
* __bss_start__
* __bss_end__
* __end__
* end
* __HeapLimit
* __StackLimit
* __StackTop
* __stack
* __Vectors_End
* __Vectors_Size
*/
ENTRY(Reset_Handler)
SECTIONS
{
.text :
{
KEEP(*(.vectors))
__Vectors_End = .;
__Vectors_Size = __Vectors_End - __Vectors;
__end__ = .;
*(.text*)
KEEP(*(.init))
KEEP(*(.fini))
/* .ctors */
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
/* .dtors */
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
*(.rodata*)
KEEP(*(.eh_frame*))
} > FLASH
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > FLASH
__exidx_end = .;
/* To copy multiple ROM to RAM sections,
* uncomment .copy.table section and,
* define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
/*
.copy.table :
{
. = ALIGN(4);
__copy_table_start__ = .;
LONG (__etext)
LONG (__data_start__)
LONG (__data_end__ - __data_start__)
LONG (__etext2)
LONG (__data2_start__)
LONG (__data2_end__ - __data2_start__)
__copy_table_end__ = .;
} > FLASH
*/
/* To clear multiple BSS sections,
* uncomment .zero.table section and,
* define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
/*
.zero.table :
{
. = ALIGN(4);
__zero_table_start__ = .;
LONG (__bss_start__)
LONG (__bss_end__ - __bss_start__)
LONG (__bss2_start__)
LONG (__bss2_end__ - __bss2_start__)
__zero_table_end__ = .;
} > FLASH
*/
__etext = .;
.data : AT (__etext)
{
__data_start__ = .;
*(vtable)
*(.data*)
. = ALIGN (4);
*(.ram)
. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
__data_end__ = .;
} > RAM
.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
} > RAM
.heap (COPY):
{
__HeapBase = .;
__end__ = .;
end = __end__;
_end = __end__;
KEEP(*(.heap*))
__HeapLimit = .;
} > RAM
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy (COPY):
{
KEEP(*(.stack*))
} > RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
/* Check if FLASH usage exceeds FLASH size */
ASSERT( LENGTH(FLASH) >= (__etext + SIZEOF(.data)), "FLASH memory overflowed !")
}

+ 0
- 5
src/main.c View File

@@ -59,11 +59,6 @@ int main()
int currled=0;
CHIP_Init();

// Needed to support debugging when using UART bootloader
#ifdef USE_BOOTLOADER
SCB->VTOR=0x800;
#endif

// Set systick to 1ms interval
if (SysTick_Config(CMU_ClockFreqGet(cmuClock_CORE) / 1000)) while (1);
gpio_init();


Loading…
Cancel
Save