initial commit
This commit is contained in:
commit
b44ce7bd77
2716 files changed
+559005
No files matched your search
@@ -0,0 +1,13 @@
|
||||
set(MCU_SUB_VARIANT 123)
|
||||
|
||||
set(JLINK_DEVICE TM4C123GH6PM)
|
||||
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/tm4c123.ld)
|
||||
|
||||
set(OPENOCD_OPTION "-f board/ti_ek-tm4c123gxl.cfg")
|
||||
set(UNIFLASH_OPTION "-c ${CMAKE_CURRENT_LIST_DIR}/${BOARD}.ccxml -r 1")
|
||||
|
||||
function(update_board TARGET)
|
||||
target_compile_definitions(${TARGET} PUBLIC
|
||||
TM4C123GH6PM
|
||||
)
|
||||
endfunction()
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2021, Ha Thach (tinyusb.org)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* This file is part of the TinyUSB stack.
|
||||
*/
|
||||
|
||||
/* metadata:
|
||||
name: TM4C123G LaunchPad
|
||||
url: https://www.ti.com/tool/EK-TM4C123GXL
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "TM4C123.h"
|
||||
|
||||
#define BOARD_UART UART0
|
||||
#define BOARD_UART_PORT GPIOA
|
||||
|
||||
#define BTN_PORT_CLK 5
|
||||
#define BOARD_BTN_PORT GPIOF
|
||||
#define BOARD_BTN 4
|
||||
#define BOARD_BTN_Msk (1u<<4)
|
||||
#define BUTTON_STATE_ACTIVE 0
|
||||
|
||||
#define LED_PORT_CLK 5
|
||||
#define LED_PORT GPIOF
|
||||
#define LED_PIN_RED 1
|
||||
#define LED_PIN_BLUE 2
|
||||
#define LED_PIN_GREEN 3
|
||||
#define LED_STATE_ON 1
|
||||
|
||||
#define BOARD_LED_PIN LED_PIN_BLUE
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
MCU_SUB_VARIANT = 123
|
||||
|
||||
CFLAGS += -DTM4C123GH6PM
|
||||
|
||||
LD_FILE = $(BOARD_PATH)/tm4c123.ld
|
||||
|
||||
# For flash-jlink target
|
||||
JLINK_DEVICE = TM4C123GH6PM
|
||||
|
||||
# flash using openocd
|
||||
OPENOCD_OPTION = -f board/ti_ek-tm4c123gxl.cfg
|
||||
|
||||
UNIFLASH_OPTION = -c ${TOP}/${BOARD_PATH}/${BOARD}.ccxml -r 1
|
||||
|
||||
flash: flash-openocd
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
<configuration XML_version="1.2" id="configuration_0">
|
||||
<instance XML_version="1.2" desc="Stellaris In-Circuit Debug Interface" href="connections/Stellaris_ICDI_Connection.xml" id="Stellaris In-Circuit Debug Interface" xml="Stellaris_ICDI_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Stellaris In-Circuit Debug Interface">
|
||||
|
||||
<instance XML_version="1.2" href="drivers/stellaris_cs_dap.xml" id="drivers" xml="stellaris_cs_dap.xml" xmlpath="drivers"/>
|
||||
|
||||
<instance XML_version="1.2" href="drivers/stellaris_cortex_m4.xml" id="drivers" xml="stellaris_cortex_m4.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
<instance XML_version="1.2" desc="Tiva TM4C123GH6PM" href="devices/tm4c123gh6pm.xml" id="Tiva TM4C123GH6PM" xml="tm4c123gh6pm.xml" xmlpath="devices"/>
|
||||
</platform>
|
||||
</connection>
|
||||
</configuration>
|
||||
</configurations>
|
||||
@@ -0,0 +1,66 @@
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
_estack = 0x20008000; /* end of RAM */
|
||||
/* Generate a link error if heap and stack don't fit into RAM */
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x1000; /* required amount of stack */
|
||||
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH(rx) : ORIGIN = 0x00000000, LENGTH = 256K
|
||||
SRAM(rwx) : ORIGIN = 0x20000000, LENGTH = 32K
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4) ;
|
||||
KEEP(*(.vectors))
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.init)
|
||||
*(.fini)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.ARM.exidx*)
|
||||
. = ALIGN(4) ;
|
||||
__end_text = . ;
|
||||
} >FLASH
|
||||
|
||||
.data : AT(ADDR(.text) + SIZEOF(.text))
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__start_data = . ;
|
||||
__la_data = LOADADDR(.data);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
. = ALIGN(4);
|
||||
__end_data = . ;
|
||||
|
||||
} >SRAM
|
||||
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4) ;
|
||||
__start_bss = . ;
|
||||
__bss_start__ = __start_bss;
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.COMMON)
|
||||
__end_bss = . ;
|
||||
. = ALIGN(4);
|
||||
}>SRAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >SRAM
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
||||
/*-Editor annotation file-*/
|
||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
|
||||
/*-Specials-*/
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
|
||||
/*-Memory Regions-*/
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x000FFFFF;
|
||||
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
|
||||
define symbol __ICFEDIT_region_RAM_end__ = 0x2003FFFF;
|
||||
/*-Sizes-*/
|
||||
define symbol __ICFEDIT_size_cstack__ = 0x8000;
|
||||
define symbol __ICFEDIT_size_heap__ = 0x10000;
|
||||
/**** End of ICF editor section. ###ICF###*/
|
||||
|
||||
define memory mem with size = 4G;
|
||||
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
|
||||
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
|
||||
|
||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
||||
|
||||
initialize by copy { readwrite };
|
||||
|
||||
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
|
||||
place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite,
|
||||
block CSTACK, block HEAP };
|
||||
@@ -0,0 +1,13 @@
|
||||
set(MCU_SUB_VARIANT 129)
|
||||
|
||||
set(JLINK_DEVICE TM4C1294NCPDT)
|
||||
set(LD_FILE_GNU ${CMAKE_CURRENT_LIST_DIR}/tm4c1294nc.ld)
|
||||
set(LD_FILE_IAR ${CMAKE_CURRENT_LIST_DIR}/TM4C1294NC.icf)
|
||||
|
||||
set(OPENOCD_OPTION "-f board/ti_ek-tm4c1294xl.cfg")
|
||||
|
||||
function(update_board TARGET)
|
||||
target_compile_definitions(${TARGET} PUBLIC
|
||||
TM4C1294NCPDT
|
||||
)
|
||||
endfunction()
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2021, Ha Thach (tinyusb.org)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* This file is part of the TinyUSB stack.
|
||||
*/
|
||||
|
||||
/* metadata:
|
||||
name: TM4C1294 LaunchPad
|
||||
url: https://www.ti.com/tool/EK-TM4C1294XL
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "TM4C129.h"
|
||||
|
||||
#define BOARD_UART UART0
|
||||
#define BOARD_UART_PORT GPIOA
|
||||
|
||||
#define BTN_PORT_CLK 8
|
||||
#define BOARD_BTN_PORT GPIOJ
|
||||
#define BOARD_BTN 0
|
||||
#define BOARD_BTN_Msk (1u<<0)
|
||||
#define BUTTON_STATE_ACTIVE 0
|
||||
|
||||
#define LED_PORT_CLK 12
|
||||
#define LED_PORT GPION
|
||||
#define LED_PIN_1 1
|
||||
#define LED_PIN_2 0
|
||||
#define LED_STATE_ON 1
|
||||
|
||||
#define BOARD_LED_PIN LED_PIN_2
|
||||
|
||||
#define GPIOA GPIOA_AHB
|
||||
#define GPIOB GPIOB_AHB
|
||||
#define GPIOC GPIOC_AHB
|
||||
#define GPIOD GPIOD_AHB
|
||||
#define GPIOE GPIOE_AHB
|
||||
#define GPIOF GPIOF_AHB
|
||||
#define GPIOG GPIOG_AHB
|
||||
#define GPIOH GPIOH_AHB
|
||||
#define GPIOI GPIOI_AHB
|
||||
#define GPIOJ GPIOJ_AHB
|
||||
|
||||
#define GPIOA_Type GPIOA_AHB_Type
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
MCU_SUB_VARIANT = 129
|
||||
|
||||
CFLAGS += -DTM4C1294NCPDT
|
||||
|
||||
LD_FILE = $(BOARD_PATH)/tm4c1294nc.ld
|
||||
|
||||
# For flash-jlink target
|
||||
JLINK_DEVICE = TM4C1294NCPDT
|
||||
|
||||
# flash using openocd
|
||||
OPENOCD_OPTION = -f board/ti_ek-tm4c1294xl.cfg
|
||||
|
||||
UNIFLASH_OPTION = -c ${TOP}/${BOARD_PATH}/${BOARD}.ccxml -r 1
|
||||
|
||||
flash: flash-openocd
|
||||
@@ -0,0 +1,66 @@
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
_estack = 0x20008000; /* end of RAM */
|
||||
/* Generate a link error if heap and stack don't fit into RAM */
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x1000; /* required amount of stack */
|
||||
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00100000
|
||||
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4) ;
|
||||
_text = . ;
|
||||
KEEP(*(.isr_vector))
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.init)
|
||||
*(.fini)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.ARM.exidx*)
|
||||
_etext = . ;
|
||||
. = ALIGN(4) ;
|
||||
} >FLASH
|
||||
|
||||
.data : AT(ADDR(.text) + SIZEOF(.text))
|
||||
{
|
||||
_data = .;
|
||||
. = ALIGN(4);
|
||||
_ldata = LOADADDR (.data);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
_edata = .;
|
||||
. = ALIGN(4);
|
||||
|
||||
} >SRAM
|
||||
|
||||
.bss :
|
||||
{
|
||||
. = ALIGN(4) ;
|
||||
_bss = .;
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.COMMON)
|
||||
_ebss = .;
|
||||
. = ALIGN(4);
|
||||
}>SRAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >SRAM
|
||||
}
|
||||
Reference in new issue
Block a user