commit d42ba1aff6a8212e2847b75a5cfad70619a8a679 Author: Ajit Ananthadevan Date: Sun Jan 25 20:35:21 2026 +1100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8450e3d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/mspm0-sdk/ +build/ +.cache/ +compile_commands.json + diff --git a/myapps/blinky-out/Makefile b/myapps/blinky-out/Makefile new file mode 100644 index 0000000..ec1e803 --- /dev/null +++ b/myapps/blinky-out/Makefile @@ -0,0 +1,107 @@ +# For Linux +RM = rm -f +RMDIR = rm -rf +DEVNULL = /dev/null +ECHOBLANKLINE = echo + +#---------------- + +SYSCONFIG_TOOL ?= /home/ajit/ti/sysconfig_1.26.2/sysconfig_cli.sh +MSPM0_SDK_INSTALL_DIR ?= $(abspath ../../mspm0-sdk) + +CC = "arm-none-eabi-gcc" +LNK = "arm-none-eabi-gcc" + +SYSCONFIG_GUI_TOOL = $(dir $(SYSCONFIG_TOOL))sysconfig_gui$(suffix $(SYSCONFIG_TOOL)) +SYSCFG_CMD_STUB = $(SYSCONFIG_TOOL) --compiler gcc --product $(MSPM0_SDK_INSTALL_DIR)/.metadata/product.json +SYSCFG_GUI_CMD_STUB = $(SYSCONFIG_GUI_TOOL) --compiler gcc --product $(MSPM0_SDK_INSTALL_DIR)/.metadata/product.json +SYSCFG_FILES := $(shell $(SYSCFG_CMD_STUB) --listGeneratedFiles --listReferencedFiles --output . empty.syscfg) + +SYSCFG_C_FILES = $(filter %.c,$(SYSCFG_FILES)) +SYSCFG_H_FILES = $(filter %.h,$(SYSCFG_FILES)) +SYSCFG_OPT_FILES = $(filter %.opt,$(SYSCFG_FILES)) + +OBJECTS = empty.obj $(patsubst %.c,%.obj,$(notdir $(SYSCFG_C_FILES))) +NAME = empty + +CFLAGS += -I. \ + $(addprefix @,$(SYSCFG_OPT_FILES)) \ + -O2 \ + @device.opt \ + "-I$(MSPM0_SDK_INSTALL_DIR)/source/third_party/CMSIS/Core/Include" \ + "-I$(MSPM0_SDK_INSTALL_DIR)/source" \ + -mcpu=cortex-m0plus \ + -march=armv6-m \ + -mthumb \ + -std=c99 \ + -mfloat-abi=soft \ + -ffunction-sections \ + -fdata-sections \ + -g \ + -gstrict-dwarf \ + -Wall \ + --specs=nano.specs + +LFLAGS += "-L$(MSPM0_SDK_INSTALL_DIR)/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x" \ + -nostartfiles \ + -Tdevice.lds.genlibs \ + -l:driverlib.a \ + -Wl,-T,device_linker.lds \ + "-Wl,-Map,$(NAME).map" \ + "-L$(MSPM0_SDK_INSTALL_DIR)/source" \ + -L.. \ + -march=armv6-m \ + -mthumb \ + -static \ + -Wl,--gc-sections \ + "-L/usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp" \ + -lgcc \ + -lc \ + -lm \ + --specs=nano.specs \ + --specs=nosys.specs + +all: $(NAME).out + +.INTERMEDIATE: syscfg +$(SYSCFG_FILES): syscfg + @ echo generation complete + +syscfg: empty.syscfg + @ echo Generating configuration files... + @ $(SYSCFG_CMD_STUB) --output $(@D) $< + + +# Helpful hint that the user needs to use a standalone SysConfig installation +$(SYSCONFIG_GUI_TOOL): + $(error $(dir $(SYSCONFIG_TOOL)) does not contain the GUI framework \ + necessary to launch the SysConfig GUI. Please set SYSCONFIG_TOOL \ + (in your SDK's imports.mak) to a standalone SysConfig installation \ + rather than one inside CCS) + +syscfg-gui: empty.syscfg $(SYSCONFIG_GUI_TOOL) + @ echo Opening SysConfig GUI + @ $(SYSCFG_GUI_CMD_STUB) $< + +define C_RULE +$(basename $(notdir $(1))).obj: $(1) $(SYSCFG_H_FILES) + @ echo Building $$@ + @ $(CC) $(CFLAGS) $$< -c -o $$@ +endef + +$(foreach c_file,$(SYSCFG_C_FILES),$(eval $(call C_RULE,$(c_file)))) + +empty.obj: src/main.c $(SYSCFG_H_FILES) + @ echo Building $@ + @ $(CC) $(CFLAGS) $< -c -o $@ + +$(NAME).out: $(OBJECTS) + @ echo linking $@ + @ $(LNK) $(OBJECTS) $(LFLAGS) -o $(NAME).out + +clean: + @ echo Cleaning... + @ $(RM) $(OBJECTS) > $(DEVNULL) 2>&1 + @ $(RM) $(NAME).out > $(DEVNULL) 2>&1 + @ $(RM) $(NAME).map > $(DEVNULL) 2>&1 + @ $(RM) $(SYSCFG_FILES)> $(DEVNULL) 2>&1 diff --git a/myapps/blinky-out/device_linker.lds b/myapps/blinky-out/device_linker.lds new file mode 100644 index 0000000..f280511 --- /dev/null +++ b/myapps/blinky-out/device_linker.lds @@ -0,0 +1,201 @@ +/***************************************************************************** + + Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0; /* required amount of heap */ +_Min_Stack_Size = 0x80; /* required amount of stack */ + + +/* Specify the memory areas */ +MEMORY +{ + FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00020000 + SRAM (RWX) : ORIGIN = 0x20200000, LENGTH = 0x00008000 + BCR_CONFIG (R) : ORIGIN = 0x41C00000, LENGTH = 0x000000FF + BSL_CONFIG (R) : ORIGIN = 0x41C00100, LENGTH = 0x00000080 +} + +/* Note: SRAM length must match MPPC/MEMSS config! Please edit it manually. */ + +REGION_ALIAS("REGION_TEXT", FLASH); +REGION_ALIAS("REGION_PREINIT_ARRAY", FLASH); +REGION_ALIAS("REGION_INIT_ARRAY", FLASH); +REGION_ALIAS("REGION_FINI_ARRAY", FLASH); +REGION_ALIAS("REGION_BSS", SRAM); +REGION_ALIAS("REGION_NOINIT", SRAM); +REGION_ALIAS("REGION_DATA", SRAM); +REGION_ALIAS("REGION_STACK", SRAM); +REGION_ALIAS("REGION_HEAP", SRAM); +REGION_ALIAS("REGION_TEXT_RAM", SRAM); +REGION_ALIAS("REGION_ARM_EXIDX", FLASH); +REGION_ALIAS("REGION_ARM_EXTAB", FLASH); + +/* Define output sections */ +SECTIONS +{ + /* section for the interrupt vector area */ + PROVIDE (_intvecs_base_address = + DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x00000000); + + .intvecs (_intvecs_base_address) : AT (_intvecs_base_address) { + KEEP (*(.intvecs)) + } > REGION_TEXT + + PROVIDE (_vtable_base_address = + DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20200000); + + .vtable (_vtable_base_address) (NOLOAD) : AT (_vtable_base_address) { + KEEP (*(.vtable)) + } > REGION_DATA + + .text : { + CREATE_OBJECT_SYMBOLS + KEEP (*(.text)) + . = ALIGN(0x8); + *(.text.*) + . = ALIGN(0x8); + KEEP (*(.ctors)) + . = ALIGN(0x8); + KEEP (*(.dtors)) + . = ALIGN(0x8); + KEEP (*(.init)) + . = ALIGN(0x8); + KEEP (*(.fini*)) + . = ALIGN(0x8); + } > REGION_TEXT AT> REGION_TEXT + + .ramfunc : { + __ramfunct_load__ = LOADADDR (.ramfunc); + __ramfunct_start__ = .; + *(.ramfunc) + . = ALIGN(0x8); + __ramfunct_end__ = .; + } > REGION_TEXT_RAM AT> REGION_TEXT + + .rodata : { + *(.rodata) + . = ALIGN(0x8); + *(.rodata.*) + . = ALIGN(0x8); + } > REGION_TEXT AT> REGION_TEXT + + .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)); + PROVIDE_HIDDEN (__preinit_array_end = .); + } > REGION_PREINIT_ARRAY AT> REGION_TEXT + + .init_array : { + . = ALIGN(0x8); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } > REGION_INIT_ARRAY AT> REGION_TEXT + + .fini_array : { + . = ALIGN(0x8); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(0x8); + } > REGION_FINI_ARRAY AT> REGION_TEXT + + .ARM.exidx : { + __exidx_start = .; + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + __exidx_end = .; + } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX + + .ARM.extab : { + . = ALIGN(0x8); + KEEP (*(.ARM.extab* .gnu.linkonce.armextab.*)) + . = ALIGN(0x8); + } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB + + __etext = .; + + .data : { + __data_load__ = LOADADDR (.data); + __data_start__ = .; + KEEP (*(.data)) + KEEP (*(.data*)) + . = ALIGN (8); + __data_end__ = .; + } > REGION_DATA AT> REGION_TEXT + + .bss : { + __bss_start__ = .; + *(.shbss) + KEEP (*(.bss)) + *(.bss.*) + *(COMMON) + . = ALIGN (8); + __bss_end__ = .; + } > REGION_BSS AT> REGION_BSS + + .noinit : { + /* place all symbols in input sections that start with .noinit */ + KEEP(*(*.noinit*)) + . = ALIGN (8); + } > REGION_NOINIT AT> REGION_NOINIT + + .heap : { + __heap_start__ = .; + end = __heap_start__; + _end = end; + __end = end; + KEEP (*(.heap)) + __heap_end__ = .; + __HeapLimit = __heap_end__; + } > REGION_HEAP AT> REGION_HEAP + + .stack (NOLOAD) : ALIGN(0x8) { + _stack = .; + KEEP(*(.stack)) + } > REGION_STACK AT> REGION_STACK + + .BCRConfig : + { + KEEP(*(.BCRConfig)) + } > BCR_CONFIG + + .BSLConfig : + { + KEEP(*(.BSLConfig)) + } > BSL_CONFIG + + __StackTop = ORIGIN(REGION_STACK) + LENGTH(REGION_STACK); + PROVIDE(__stack = __StackTop); +} diff --git a/myapps/blinky-out/empty.syscfg b/myapps/blinky-out/empty.syscfg new file mode 100644 index 0000000..c19d068 --- /dev/null +++ b/myapps/blinky-out/empty.syscfg @@ -0,0 +1,20 @@ +/** + * These arguments were used when this file was generated. They will be automatically applied on subsequent loads + * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. + */ +//@cliArgs --device "MSPM0G350X" --package "LQFP-64(PM)" --part "Default" +//@v2CliArgs --device "MSPM0G3507" --package "LQFP-64(PM)" +// @cliArgs --board /ti/boards/LP_MSPM0G3507 --rtos nortos + +/** + * Import the modules used in this configuration. + */ +const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL"); + +/** + * Write custom configuration values to the imported modules. + */ + +const Board = scripting.addModule("/ti/driverlib/Board", {}, false); + +SYSCTL.forceDefaultClkConfig = true; diff --git a/myapps/blinky-out/src/main.c b/myapps/blinky-out/src/main.c new file mode 100644 index 0000000..21140a9 --- /dev/null +++ b/myapps/blinky-out/src/main.c @@ -0,0 +1,10 @@ + +#include "ti_msp_dl_config.h" + +int main(void) +{ + SYSCFG_DL_init(); + + while (1) { + } +} diff --git a/myapps/blinky-out/startup_mspm0g350x_gcc.c b/myapps/blinky-out/startup_mspm0g350x_gcc.c new file mode 100644 index 0000000..8777f26 --- /dev/null +++ b/myapps/blinky-out/startup_mspm0g350x_gcc.c @@ -0,0 +1,221 @@ +/***************************************************************************** + + Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ + +#include + +/* Entry point for the application. */ +extern void SystemInit(void); +extern int main( void ); + +extern uint32_t __data_load__; +extern uint32_t __data_start__; +extern uint32_t __data_end__; +extern uint32_t __ramfunct_load__; +extern uint32_t __ramfunct_start__; +extern uint32_t __ramfunct_end__; +extern uint32_t __bss_start__; +extern uint32_t __bss_end__; +extern uint32_t __StackTop; + +typedef void( *pFunc )( void ); + +/* Forward declaration of the default fault handlers. */ +void Default_Handler(void); +extern void Reset_Handler (void) __attribute__((weak)); +extern void __libc_init_array(void); +extern void _init (void) __attribute__((weak, alias("initStub"))); +void initStub(void){;} + +/* Processor Exceptions */ +extern void NMI_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void HardFault_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SVC_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void PendSV_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SysTick_Handler (void) __attribute__((weak, alias("Default_Handler"))); + +/* Device Specific Interrupt Handlers */ +extern void GROUP0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void GROUP1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG8_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART3_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void ADC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void ADC1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void CANFD0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void DAC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SPI0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SPI1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART2_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG6_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMA0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMA1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG7_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG12_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void I2C0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void I2C1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void AES_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void RTC_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void DMA_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); + + +/* Interrupt vector table. Note that the proper constructs must be placed on this to */ +/* ensure that it ends up at physical address 0x0000.0000 or at the start of */ +/* the program if located at a start address other than 0. */ +void (* const interruptVectors[])(void) __attribute__ ((used)) __attribute__ ((section (".intvecs"))) = +{ + (pFunc)&__StackTop, /* The initial stack pointer */ + Reset_Handler, /* The reset handler */ + NMI_Handler, /* The NMI handler */ + HardFault_Handler, /* The hard fault handler */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + SVC_Handler, /* SVCall handler */ + 0, /* Reserved */ + 0, /* Reserved */ + PendSV_Handler, /* The PendSV handler */ + SysTick_Handler, /* SysTick handler */ + GROUP0_IRQHandler, /* GROUP0 interrupt handler */ + GROUP1_IRQHandler, /* GROUP1 interrupt handler */ + TIMG8_IRQHandler, /* TIMG8 interrupt handler */ + UART3_IRQHandler, /* UART3 interrupt handler */ + ADC0_IRQHandler, /* ADC0 interrupt handler */ + ADC1_IRQHandler, /* ADC1 interrupt handler */ + CANFD0_IRQHandler, /* CANFD0 interrupt handler */ + DAC0_IRQHandler, /* DAC0 interrupt handler */ + 0, /* Reserved */ + SPI0_IRQHandler, /* SPI0 interrupt handler */ + SPI1_IRQHandler, /* SPI1 interrupt handler */ + 0, /* Reserved */ + 0, /* Reserved */ + UART1_IRQHandler, /* UART1 interrupt handler */ + UART2_IRQHandler, /* UART2 interrupt handler */ + UART0_IRQHandler, /* UART0 interrupt handler */ + TIMG0_IRQHandler, /* TIMG0 interrupt handler */ + TIMG6_IRQHandler, /* TIMG6 interrupt handler */ + TIMA0_IRQHandler, /* TIMA0 interrupt handler */ + TIMA1_IRQHandler, /* TIMA1 interrupt handler */ + TIMG7_IRQHandler, /* TIMG7 interrupt handler */ + TIMG12_IRQHandler, /* TIMG12 interrupt handler */ + 0, /* Reserved */ + 0, /* Reserved */ + I2C0_IRQHandler, /* I2C0 interrupt handler */ + I2C1_IRQHandler, /* I2C1 interrupt handler */ + 0, /* Reserved */ + 0, /* Reserved */ + AES_IRQHandler, /* AES interrupt handler */ + 0, /* Reserved */ + RTC_IRQHandler, /* RTC interrupt handler */ + DMA_IRQHandler, /* DMA interrupt handler */ + +}; + +/* Forward declaration of the default fault handlers. */ +/* This is the code that gets called when the processor first starts execution */ +/* following a reset event. Only the absolutely necessary set is performed, */ +/* after which the application supplied entry() routine is called. Any fancy */ +/* actions (such as making decisions based on the reset cause register, and */ +/* resetting the bits in that register) are left solely in the hands of the */ +/* application. */ +void Reset_Handler(void) +{ + uint32_t *pui32Src, *pui32Dest; + uint32_t *bs, *be; + + // + // Copy the data segment initializers from flash to SRAM. + // + pui32Src = &__data_load__; + for(pui32Dest = &__data_start__; pui32Dest < &__data_end__; ) + { + *pui32Dest++ = *pui32Src++; + } + + // + // Copy the ramfunct segment initializers from flash to SRAM. + // + pui32Src = &__ramfunct_load__; + for(pui32Dest = &__ramfunct_start__; pui32Dest < &__ramfunct_end__; ) + { + *pui32Dest++ = *pui32Src++; + } + + // Initialize .bss to zero + bs = &__bss_start__; + be = &__bss_end__; + while (bs < be) + { + *bs = 0; + bs++; + } + + /* + * System initialization routine can be called here, but it's not + * required for MSPM0. + */ + // SystemInit(); + + // + // Initialize virtual tables, along executing init, init_array, constructors + // and preinit_array functions + // + __libc_init_array(); + + // + // Call the application's entry point. + // + main(); + + // + // If we ever return signal Error + // + HardFault_Handler(); +} + +/* This is the code that gets called when the processor receives an unexpected */ +/* interrupt. This simply enters an infinite loop, preserving the system state */ +/* for examination by a debugger. */ +void Default_Handler(void) +{ + /* Enter an infinite loop. */ + while(1) + { + } +} diff --git a/myapps/blinky-out/ti_msp_dl_config.c b/myapps/blinky-out/ti_msp_dl_config.c new file mode 100644 index 0000000..eda8bc6 --- /dev/null +++ b/myapps/blinky-out/ti_msp_dl_config.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2023, Texas Instruments Incorporated + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ============ ti_msp_dl_config.c ============= + * Configured MSPM0 DriverLib module definitions + * + * DO NOT EDIT - This file is generated for the MSPM0G350X + * by the SysConfig tool. + */ + +#include "ti_msp_dl_config.h" + +/* + * ======== SYSCFG_DL_init ======== + * Perform any initialization needed before using any board APIs + */ +SYSCONFIG_WEAK void SYSCFG_DL_init(void) +{ + SYSCFG_DL_initPower(); + SYSCFG_DL_GPIO_init(); + /* Module-Specific Initializations*/ + SYSCFG_DL_SYSCTL_init(); +} + +SYSCONFIG_WEAK void SYSCFG_DL_initPower(void) +{ + DL_GPIO_reset(GPIOA); + DL_GPIO_reset(GPIOB); + + DL_GPIO_enablePower(GPIOA); + DL_GPIO_enablePower(GPIOB); + delay_cycles(POWER_STARTUP_DELAY); +} + +SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void) +{ + +} + + +SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void) +{ + + //Low Power Mode is configured to be SLEEP0 + DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0); + + DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE); + /* Set default configuration */ + DL_SYSCTL_disableHFXT(); + DL_SYSCTL_disableSYSPLL(); + DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_1); + DL_SYSCTL_setMCLKDivider(DL_SYSCTL_MCLK_DIVIDER_DISABLE); + +} + + diff --git a/myapps/blinky-out/ti_msp_dl_config.h b/myapps/blinky-out/ti_msp_dl_config.h new file mode 100644 index 0000000..b6f0d1f --- /dev/null +++ b/myapps/blinky-out/ti_msp_dl_config.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2023, Texas Instruments Incorporated - http://www.ti.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ============ ti_msp_dl_config.h ============= + * Configured MSPM0 DriverLib module declarations + * + * DO NOT EDIT - This file is generated for the MSPM0G350X + * by the SysConfig tool. + */ +#ifndef ti_msp_dl_config_h +#define ti_msp_dl_config_h + +#define CONFIG_MSPM0G350X +#define CONFIG_MSPM0G3507 + +#if defined(__ti_version__) || defined(__TI_COMPILER_VERSION__) +#define SYSCONFIG_WEAK __attribute__((weak)) +#elif defined(__IAR_SYSTEMS_ICC__) +#define SYSCONFIG_WEAK __weak +#elif defined(__GNUC__) +#define SYSCONFIG_WEAK __attribute__((weak)) +#endif + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * ======== SYSCFG_DL_init ======== + * Perform all required MSP DL initialization + * + * This function should be called once at a point before any use of + * MSP DL. + */ + + +/* clang-format off */ + +#define POWER_STARTUP_DELAY (16) + + +#define CPUCLK_FREQ 32000000 + + + +/* clang-format on */ + +void SYSCFG_DL_init(void); +void SYSCFG_DL_initPower(void); +void SYSCFG_DL_GPIO_init(void); +void SYSCFG_DL_SYSCTL_init(void); + + +#ifdef __cplusplus +} +#endif + +#endif /* ti_msp_dl_config_h */ diff --git a/myapps/blinky/Makefile b/myapps/blinky/Makefile new file mode 100644 index 0000000..ec1e803 --- /dev/null +++ b/myapps/blinky/Makefile @@ -0,0 +1,107 @@ +# For Linux +RM = rm -f +RMDIR = rm -rf +DEVNULL = /dev/null +ECHOBLANKLINE = echo + +#---------------- + +SYSCONFIG_TOOL ?= /home/ajit/ti/sysconfig_1.26.2/sysconfig_cli.sh +MSPM0_SDK_INSTALL_DIR ?= $(abspath ../../mspm0-sdk) + +CC = "arm-none-eabi-gcc" +LNK = "arm-none-eabi-gcc" + +SYSCONFIG_GUI_TOOL = $(dir $(SYSCONFIG_TOOL))sysconfig_gui$(suffix $(SYSCONFIG_TOOL)) +SYSCFG_CMD_STUB = $(SYSCONFIG_TOOL) --compiler gcc --product $(MSPM0_SDK_INSTALL_DIR)/.metadata/product.json +SYSCFG_GUI_CMD_STUB = $(SYSCONFIG_GUI_TOOL) --compiler gcc --product $(MSPM0_SDK_INSTALL_DIR)/.metadata/product.json +SYSCFG_FILES := $(shell $(SYSCFG_CMD_STUB) --listGeneratedFiles --listReferencedFiles --output . empty.syscfg) + +SYSCFG_C_FILES = $(filter %.c,$(SYSCFG_FILES)) +SYSCFG_H_FILES = $(filter %.h,$(SYSCFG_FILES)) +SYSCFG_OPT_FILES = $(filter %.opt,$(SYSCFG_FILES)) + +OBJECTS = empty.obj $(patsubst %.c,%.obj,$(notdir $(SYSCFG_C_FILES))) +NAME = empty + +CFLAGS += -I. \ + $(addprefix @,$(SYSCFG_OPT_FILES)) \ + -O2 \ + @device.opt \ + "-I$(MSPM0_SDK_INSTALL_DIR)/source/third_party/CMSIS/Core/Include" \ + "-I$(MSPM0_SDK_INSTALL_DIR)/source" \ + -mcpu=cortex-m0plus \ + -march=armv6-m \ + -mthumb \ + -std=c99 \ + -mfloat-abi=soft \ + -ffunction-sections \ + -fdata-sections \ + -g \ + -gstrict-dwarf \ + -Wall \ + --specs=nano.specs + +LFLAGS += "-L$(MSPM0_SDK_INSTALL_DIR)/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x" \ + -nostartfiles \ + -Tdevice.lds.genlibs \ + -l:driverlib.a \ + -Wl,-T,device_linker.lds \ + "-Wl,-Map,$(NAME).map" \ + "-L$(MSPM0_SDK_INSTALL_DIR)/source" \ + -L.. \ + -march=armv6-m \ + -mthumb \ + -static \ + -Wl,--gc-sections \ + "-L/usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp" \ + -lgcc \ + -lc \ + -lm \ + --specs=nano.specs \ + --specs=nosys.specs + +all: $(NAME).out + +.INTERMEDIATE: syscfg +$(SYSCFG_FILES): syscfg + @ echo generation complete + +syscfg: empty.syscfg + @ echo Generating configuration files... + @ $(SYSCFG_CMD_STUB) --output $(@D) $< + + +# Helpful hint that the user needs to use a standalone SysConfig installation +$(SYSCONFIG_GUI_TOOL): + $(error $(dir $(SYSCONFIG_TOOL)) does not contain the GUI framework \ + necessary to launch the SysConfig GUI. Please set SYSCONFIG_TOOL \ + (in your SDK's imports.mak) to a standalone SysConfig installation \ + rather than one inside CCS) + +syscfg-gui: empty.syscfg $(SYSCONFIG_GUI_TOOL) + @ echo Opening SysConfig GUI + @ $(SYSCFG_GUI_CMD_STUB) $< + +define C_RULE +$(basename $(notdir $(1))).obj: $(1) $(SYSCFG_H_FILES) + @ echo Building $$@ + @ $(CC) $(CFLAGS) $$< -c -o $$@ +endef + +$(foreach c_file,$(SYSCFG_C_FILES),$(eval $(call C_RULE,$(c_file)))) + +empty.obj: src/main.c $(SYSCFG_H_FILES) + @ echo Building $@ + @ $(CC) $(CFLAGS) $< -c -o $@ + +$(NAME).out: $(OBJECTS) + @ echo linking $@ + @ $(LNK) $(OBJECTS) $(LFLAGS) -o $(NAME).out + +clean: + @ echo Cleaning... + @ $(RM) $(OBJECTS) > $(DEVNULL) 2>&1 + @ $(RM) $(NAME).out > $(DEVNULL) 2>&1 + @ $(RM) $(NAME).map > $(DEVNULL) 2>&1 + @ $(RM) $(SYSCFG_FILES)> $(DEVNULL) 2>&1 diff --git a/myapps/blinky/device.lds.genlibs b/myapps/blinky/device.lds.genlibs new file mode 100644 index 0000000..efec0cd --- /dev/null +++ b/myapps/blinky/device.lds.genlibs @@ -0,0 +1,53 @@ +/***************************************************************************** + + Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ +/* + * ======== board.cmd.genlibs ======== + * Libraries needed to link this application's configuration + * + * NOTE, this feature requires software components configured in your + * system to correctly indicate their dependencies and report the + * libraries needed for your specific configuration. If you find + * errors, please report them on TI's E2E forums + * (https://e2e.ti.com/) so they can be addressed in a future + * release. + * + * This file allows one to portably link applications that use SysConfig + * _without_ having to make changes to build rules when moving to a new + * device OR when upgrading to a new version of a SysConfig enabled + * product. + * + * DO NOT EDIT - This file is generated by the SysConfig tool for the + * TI C/C++ toolchain + */ +INPUT("ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a") diff --git a/myapps/blinky/device.opt b/myapps/blinky/device.opt new file mode 100644 index 0000000..16b265b --- /dev/null +++ b/myapps/blinky/device.opt @@ -0,0 +1,2 @@ +-D__MSPM0G3507__ +-D__USE_SYSCONFIG__ diff --git a/myapps/blinky/device_linker.lds b/myapps/blinky/device_linker.lds new file mode 100644 index 0000000..f280511 --- /dev/null +++ b/myapps/blinky/device_linker.lds @@ -0,0 +1,201 @@ +/***************************************************************************** + + Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0; /* required amount of heap */ +_Min_Stack_Size = 0x80; /* required amount of stack */ + + +/* Specify the memory areas */ +MEMORY +{ + FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00020000 + SRAM (RWX) : ORIGIN = 0x20200000, LENGTH = 0x00008000 + BCR_CONFIG (R) : ORIGIN = 0x41C00000, LENGTH = 0x000000FF + BSL_CONFIG (R) : ORIGIN = 0x41C00100, LENGTH = 0x00000080 +} + +/* Note: SRAM length must match MPPC/MEMSS config! Please edit it manually. */ + +REGION_ALIAS("REGION_TEXT", FLASH); +REGION_ALIAS("REGION_PREINIT_ARRAY", FLASH); +REGION_ALIAS("REGION_INIT_ARRAY", FLASH); +REGION_ALIAS("REGION_FINI_ARRAY", FLASH); +REGION_ALIAS("REGION_BSS", SRAM); +REGION_ALIAS("REGION_NOINIT", SRAM); +REGION_ALIAS("REGION_DATA", SRAM); +REGION_ALIAS("REGION_STACK", SRAM); +REGION_ALIAS("REGION_HEAP", SRAM); +REGION_ALIAS("REGION_TEXT_RAM", SRAM); +REGION_ALIAS("REGION_ARM_EXIDX", FLASH); +REGION_ALIAS("REGION_ARM_EXTAB", FLASH); + +/* Define output sections */ +SECTIONS +{ + /* section for the interrupt vector area */ + PROVIDE (_intvecs_base_address = + DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x00000000); + + .intvecs (_intvecs_base_address) : AT (_intvecs_base_address) { + KEEP (*(.intvecs)) + } > REGION_TEXT + + PROVIDE (_vtable_base_address = + DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20200000); + + .vtable (_vtable_base_address) (NOLOAD) : AT (_vtable_base_address) { + KEEP (*(.vtable)) + } > REGION_DATA + + .text : { + CREATE_OBJECT_SYMBOLS + KEEP (*(.text)) + . = ALIGN(0x8); + *(.text.*) + . = ALIGN(0x8); + KEEP (*(.ctors)) + . = ALIGN(0x8); + KEEP (*(.dtors)) + . = ALIGN(0x8); + KEEP (*(.init)) + . = ALIGN(0x8); + KEEP (*(.fini*)) + . = ALIGN(0x8); + } > REGION_TEXT AT> REGION_TEXT + + .ramfunc : { + __ramfunct_load__ = LOADADDR (.ramfunc); + __ramfunct_start__ = .; + *(.ramfunc) + . = ALIGN(0x8); + __ramfunct_end__ = .; + } > REGION_TEXT_RAM AT> REGION_TEXT + + .rodata : { + *(.rodata) + . = ALIGN(0x8); + *(.rodata.*) + . = ALIGN(0x8); + } > REGION_TEXT AT> REGION_TEXT + + .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)); + PROVIDE_HIDDEN (__preinit_array_end = .); + } > REGION_PREINIT_ARRAY AT> REGION_TEXT + + .init_array : { + . = ALIGN(0x8); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } > REGION_INIT_ARRAY AT> REGION_TEXT + + .fini_array : { + . = ALIGN(0x8); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(0x8); + } > REGION_FINI_ARRAY AT> REGION_TEXT + + .ARM.exidx : { + __exidx_start = .; + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + __exidx_end = .; + } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX + + .ARM.extab : { + . = ALIGN(0x8); + KEEP (*(.ARM.extab* .gnu.linkonce.armextab.*)) + . = ALIGN(0x8); + } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB + + __etext = .; + + .data : { + __data_load__ = LOADADDR (.data); + __data_start__ = .; + KEEP (*(.data)) + KEEP (*(.data*)) + . = ALIGN (8); + __data_end__ = .; + } > REGION_DATA AT> REGION_TEXT + + .bss : { + __bss_start__ = .; + *(.shbss) + KEEP (*(.bss)) + *(.bss.*) + *(COMMON) + . = ALIGN (8); + __bss_end__ = .; + } > REGION_BSS AT> REGION_BSS + + .noinit : { + /* place all symbols in input sections that start with .noinit */ + KEEP(*(*.noinit*)) + . = ALIGN (8); + } > REGION_NOINIT AT> REGION_NOINIT + + .heap : { + __heap_start__ = .; + end = __heap_start__; + _end = end; + __end = end; + KEEP (*(.heap)) + __heap_end__ = .; + __HeapLimit = __heap_end__; + } > REGION_HEAP AT> REGION_HEAP + + .stack (NOLOAD) : ALIGN(0x8) { + _stack = .; + KEEP(*(.stack)) + } > REGION_STACK AT> REGION_STACK + + .BCRConfig : + { + KEEP(*(.BCRConfig)) + } > BCR_CONFIG + + .BSLConfig : + { + KEEP(*(.BSLConfig)) + } > BSL_CONFIG + + __StackTop = ORIGIN(REGION_STACK) + LENGTH(REGION_STACK); + PROVIDE(__stack = __StackTop); +} diff --git a/myapps/blinky/empty.map b/myapps/blinky/empty.map new file mode 100644 index 0000000..58d21f1 --- /dev/null +++ b/myapps/blinky/empty.map @@ -0,0 +1,377 @@ +Archive member included to satisfy reference by file (symbol) + +/home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + ti_msp_dl_config.obj (DL_Common_delayCycles) +/usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + startup_mspm0g350x_gcc.obj (__libc_init_array) +/usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + startup_mspm0g350x_gcc.obj (memset) +/usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + startup_mspm0g350x_gcc.obj (memcpy) + +There are no discarded input sections + +Memory Configuration + +Name Origin Length Attributes +FLASH 0x00000000 0x00020000 xr +SRAM 0x20200000 0x00008000 xrw +BCR_CONFIG 0x41c00000 0x000000ff r +BSL_CONFIG 0x41c00100 0x00000080 r +*default* 0x00000000 0xffffffff + +Linker script and memory map + +LOAD empty.obj +LOAD ti_msp_dl_config.obj +LOAD startup_mspm0g350x_gcc.obj +LOAD /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a + 0x00000000 _Min_Heap_Size = 0x0 + 0x00000080 _Min_Stack_Size = 0x80 + 0x00000000 PROVIDE (_intvecs_base_address = DEFINED (_intvecs_base_address)?_intvecs_base_address:0x0) + +.intvecs 0x00000000 0xc0 + *(.intvecs) + .intvecs 0x00000000 0xc0 startup_mspm0g350x_gcc.obj + 0x00000000 interruptVectors + 0x20200000 PROVIDE (_vtable_base_address = DEFINED (_vtable_base_address)?_vtable_base_address:0x20200000) + +.vtable + *(.vtable) + +.text 0x000000c0 0x2b0 + CREATE_OBJECT_SYMBOLS + *(.text) + .text 0x000000c0 0x0 empty.obj + .text 0x000000c0 0x0 ti_msp_dl_config.obj + .text 0x000000c0 0x0 startup_mspm0g350x_gcc.obj + .text 0x000000c0 0x0 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .text 0x000000c0 0x48 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + 0x000000c0 __libc_init_array + .text 0x00000108 0xa8 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + 0x00000108 memset + .text 0x000001b0 0x8c /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + 0x000001b0 memcpy + 0x00000240 . = ALIGN (0x8) + *fill* 0x0000023c 0x4 + *(.text.*) + .text.startup.main + 0x00000240 0x8 empty.obj + 0x00000240 main + .text.SYSCFG_DL_initPower + 0x00000248 0x34 ti_msp_dl_config.obj + 0x00000248 SYSCFG_DL_initPower + .text.SYSCFG_DL_GPIO_init + 0x0000027c 0x4 ti_msp_dl_config.obj + 0x0000027c SYSCFG_DL_GPIO_init + .text.SYSCFG_DL_SYSCTL_init + 0x00000280 0x50 ti_msp_dl_config.obj + 0x00000280 SYSCFG_DL_SYSCTL_init + .text.SYSCFG_DL_init + 0x000002d0 0x10 ti_msp_dl_config.obj + 0x000002d0 SYSCFG_DL_init + .text.Default_Handler + 0x000002e0 0x4 startup_mspm0g350x_gcc.obj + 0x000002e0 TIMG6_IRQHandler + 0x000002e0 TIMG8_IRQHandler + 0x000002e0 I2C0_IRQHandler + 0x000002e0 HardFault_Handler + 0x000002e0 SysTick_Handler + 0x000002e0 PendSV_Handler + 0x000002e0 NMI_Handler + 0x000002e0 I2C1_IRQHandler + 0x000002e0 UART1_IRQHandler + 0x000002e0 TIMA1_IRQHandler + 0x000002e0 UART0_IRQHandler + 0x000002e0 ADC0_IRQHandler + 0x000002e0 SPI1_IRQHandler + 0x000002e0 TIMG0_IRQHandler + 0x000002e0 ADC1_IRQHandler + 0x000002e0 GROUP1_IRQHandler + 0x000002e0 RTC_IRQHandler + 0x000002e0 GROUP0_IRQHandler + 0x000002e0 UART2_IRQHandler + 0x000002e0 Default_Handler + 0x000002e0 SVC_Handler + 0x000002e0 TIMG12_IRQHandler + 0x000002e0 DAC0_IRQHandler + 0x000002e0 TIMG7_IRQHandler + 0x000002e0 SPI0_IRQHandler + 0x000002e0 AES_IRQHandler + 0x000002e0 DMA_IRQHandler + 0x000002e0 TIMA0_IRQHandler + 0x000002e0 UART3_IRQHandler + 0x000002e0 CANFD0_IRQHandler + .text.Reset_Handler + 0x000002e4 0x78 startup_mspm0g350x_gcc.obj + 0x000002e4 Reset_Handler + .text.initStub + 0x0000035c 0x4 startup_mspm0g350x_gcc.obj + 0x0000035c _init + 0x0000035c initStub + .text.DL_Common_delayCycles + 0x00000360 0xc /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + 0x00000360 DL_Common_delayCycles + 0x00000370 . = ALIGN (0x8) + *fill* 0x0000036c 0x4 + *(.ctors) + 0x00000370 . = ALIGN (0x8) + *(.dtors) + 0x00000370 . = ALIGN (0x8) + *(.init) + 0x00000370 . = ALIGN (0x8) + *(.fini*) + 0x00000370 . = ALIGN (0x8) + +.glue_7 0x00000370 0x0 + .glue_7 0x00000370 0x0 linker stubs + +.glue_7t 0x00000370 0x0 + .glue_7t 0x00000370 0x0 linker stubs + +.vfp11_veneer 0x00000370 0x0 + .vfp11_veneer 0x00000370 0x0 linker stubs + +.v4_bx 0x00000370 0x0 + .v4_bx 0x00000370 0x0 linker stubs + +.iplt 0x00000370 0x0 + .iplt 0x00000370 0x0 empty.obj + +.rel.dyn 0x00000370 0x0 + .rel.iplt 0x00000370 0x0 empty.obj + +.ramfunc 0x20200000 0x0 load address 0x00000370 + 0x00000370 __ramfunct_load__ = LOADADDR (.ramfunc) + 0x20200000 __ramfunct_start__ = . + *(.ramfunc) + 0x20200000 . = ALIGN (0x8) + 0x20200000 __ramfunct_end__ = . + +.rodata 0x00000370 0x0 + *(.rodata) + 0x00000370 . = ALIGN (0x8) + *(.rodata.*) + 0x00000370 . = ALIGN (0x8) + +.preinit_array 0x00000370 0x0 + 0x00000370 PROVIDE (__preinit_array_start = .) + *(.preinit_array*) + 0x00000370 PROVIDE (__preinit_array_end = .) + +.init_array 0x00000370 0x0 + 0x00000370 . = ALIGN (0x8) + 0x00000370 PROVIDE (__init_array_start = .) + *(SORT_BY_NAME(.init_array.*)) + *(.init_array*) + 0x00000370 PROVIDE (__init_array_end = .) + +.fini_array 0x00000370 0x0 + 0x00000370 . = ALIGN (0x8) + [!provide] PROVIDE (__fini_array_start = .) + *(SORT_BY_NAME(.fini_array.*)) + *(.fini_array*) + [!provide] PROVIDE (__fini_array_end = .) + 0x00000370 . = ALIGN (0x8) + +.ARM.exidx 0x00000370 0x0 + 0x00000370 __exidx_start = . + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + 0x00000370 __exidx_end = . + +.ARM.extab 0x00000370 0x0 + 0x00000370 . = ALIGN (0x8) + *(.ARM.extab* .gnu.linkonce.armextab.*) + 0x00000370 . = ALIGN (0x8) + 0x00000370 __etext = . + +.data 0x20200000 0x0 load address 0x00000370 + 0x00000370 __data_load__ = LOADADDR (.data) + 0x20200000 __data_start__ = . + *(.data) + .data 0x20200000 0x0 empty.obj + .data 0x20200000 0x0 ti_msp_dl_config.obj + .data 0x20200000 0x0 startup_mspm0g350x_gcc.obj + .data 0x20200000 0x0 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .data 0x20200000 0x0 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .data 0x20200000 0x0 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .data 0x20200000 0x0 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + *(.data*) + 0x20200000 . = ALIGN (0x8) + 0x20200000 __data_end__ = . + +.igot.plt 0x20200000 0x0 load address 0x00000370 + .igot.plt 0x20200000 0x0 empty.obj + +.bss 0x20200000 0x0 + 0x20200000 __bss_start__ = . + *(.shbss) + *(.bss) + .bss 0x20200000 0x0 empty.obj + .bss 0x20200000 0x0 ti_msp_dl_config.obj + .bss 0x20200000 0x0 startup_mspm0g350x_gcc.obj + .bss 0x20200000 0x0 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .bss 0x20200000 0x0 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .bss 0x20200000 0x0 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .bss 0x20200000 0x0 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + *(.bss.*) + *(COMMON) + 0x20200000 . = ALIGN (0x8) + 0x20200000 __bss_end__ = . + +.noinit 0x20200000 0x0 + *(*.noinit*) + 0x20200000 . = ALIGN (0x8) + +.heap 0x20200000 0x0 + 0x20200000 __heap_start__ = . + 0x20200000 end = __heap_start__ + 0x20200000 _end = end + 0x20200000 __end = end + *(.heap) + 0x20200000 __heap_end__ = . + 0x20200000 __HeapLimit = __heap_end__ + +.stack 0x20200000 0x0 + 0x20200000 _stack = . + *(.stack) + +.BCRConfig + *(.BCRConfig) + +.BSLConfig + *(.BSLConfig) + 0x20208000 __StackTop = (ORIGIN (REGION_STACK) + LENGTH (REGION_STACK)) + [!provide] PROVIDE (__stack = __StackTop) +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp/libgcc.a +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libm.a +START GROUP +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp/libgcc.a +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a +END GROUP +START GROUP +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp/libgcc.a +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libnosys.a +END GROUP +START GROUP +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp/libgcc.a +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a +LOAD /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libnosys.a +END GROUP +LOAD /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a +OUTPUT(empty.out elf32-littlearm) +LOAD linker stubs + +.debug_info 0x00000000 0x109bd + .debug_info 0x00000000 0x5525 empty.obj + .debug_info 0x00005525 0x5912 ti_msp_dl_config.obj + .debug_info 0x0000ae37 0x1d9 startup_mspm0g350x_gcc.obj + .debug_info 0x0000b010 0x561b /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .debug_info 0x0001062b 0x10b /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .debug_info 0x00010736 0x135 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .debug_info 0x0001086b 0x152 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_abbrev 0x00000000 0x92e + .debug_abbrev 0x00000000 0x174 empty.obj + .debug_abbrev 0x00000174 0x2ca ti_msp_dl_config.obj + .debug_abbrev 0x0000043e 0x140 startup_mspm0g350x_gcc.obj + .debug_abbrev 0x0000057e 0x166 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .debug_abbrev 0x000006e4 0xc9 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .debug_abbrev 0x000007ad 0xb7 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .debug_abbrev 0x00000864 0xca /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_aranges 0x00000000 0x108 + .debug_aranges + 0x00000000 0x20 empty.obj + .debug_aranges + 0x00000020 0x38 ti_msp_dl_config.obj + .debug_aranges + 0x00000058 0x30 startup_mspm0g350x_gcc.obj + .debug_aranges + 0x00000088 0x20 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .debug_aranges + 0x000000a8 0x20 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .debug_aranges + 0x000000c8 0x20 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .debug_aranges + 0x000000e8 0x20 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_rnglists + 0x00000000 0x96 + .debug_rnglists + 0x00000000 0x13 empty.obj + .debug_rnglists + 0x00000013 0x64 ti_msp_dl_config.obj + .debug_rnglists + 0x00000077 0x1f startup_mspm0g350x_gcc.obj + +.debug_line 0x00000000 0x12c8 + .debug_line 0x00000000 0x32b empty.obj + .debug_line 0x0000032b 0x569 ti_msp_dl_config.obj + .debug_line 0x00000894 0x15e startup_mspm0g350x_gcc.obj + .debug_line 0x000009f2 0x425 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .debug_line 0x00000e17 0x105 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .debug_line 0x00000f1c 0x1c1 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .debug_line 0x000010dd 0x1eb /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_str 0x00000000 0x231f + .debug_str 0x00000000 0x231f empty.obj + 0x1a63 (size before relaxing) + .debug_str 0x0000231f 0x1ee4 ti_msp_dl_config.obj + .debug_str 0x0000231f 0x2d3 startup_mspm0g350x_gcc.obj + .debug_str 0x0000231f 0x1b26 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .debug_str 0x0000231f 0x1f7 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .debug_str 0x0000231f 0x1aa /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .debug_str 0x0000231f 0x1c7 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.comment 0x00000000 0xc5 + .comment 0x00000000 0xc5 empty.obj + 0x27 (size before relaxing) + .comment 0x000000c5 0x27 ti_msp_dl_config.obj + .comment 0x000000c5 0x27 startup_mspm0g350x_gcc.obj + .comment 0x000000c5 0x7a /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .comment 0x000000c5 0x27 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .comment 0x000000c5 0x27 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .comment 0x000000c5 0x27 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.ARM.attributes + 0x00000000 0x2c + .ARM.attributes + 0x00000000 0x2c empty.obj + .ARM.attributes + 0x0000002c 0x2c ti_msp_dl_config.obj + .ARM.attributes + 0x00000058 0x2c startup_mspm0g350x_gcc.obj + .ARM.attributes + 0x00000084 0x2b /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .ARM.attributes + 0x000000af 0x2c /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .ARM.attributes + 0x000000db 0x2c /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .ARM.attributes + 0x00000107 0x2c /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_frame 0x00000000 0x17c + .debug_frame 0x00000000 0x28 empty.obj + .debug_frame 0x00000028 0x60 ti_msp_dl_config.obj + .debug_frame 0x00000088 0x48 startup_mspm0g350x_gcc.obj + .debug_frame 0x000000d0 0x20 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) + .debug_frame 0x000000f0 0x2c /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .debug_frame 0x0000011c 0x30 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .debug_frame 0x0000014c 0x30 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_loclists + 0x00000000 0x5c6 + .debug_loclists + 0x00000000 0xdf ti_msp_dl_config.obj + .debug_loclists + 0x000000df 0x5a /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-init.o) + .debug_loclists + 0x00000139 0x1c6 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memset.o) + .debug_loclists + 0x000002ff 0x2c7 /usr/lib/gcc/arm-none-eabi/14.2.1/../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_ranges 0x00000000 0x10 + .debug_ranges 0x00000000 0x10 /home/ajit/work/ti/msp/mspm0-sdk/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a(dl_common.o) diff --git a/myapps/blinky/empty.obj b/myapps/blinky/empty.obj new file mode 100644 index 0000000..eb3a2a1 Binary files /dev/null and b/myapps/blinky/empty.obj differ diff --git a/myapps/blinky/empty.out b/myapps/blinky/empty.out new file mode 100755 index 0000000..31bee31 Binary files /dev/null and b/myapps/blinky/empty.out differ diff --git a/myapps/blinky/empty.syscfg b/myapps/blinky/empty.syscfg new file mode 100644 index 0000000..c19d068 --- /dev/null +++ b/myapps/blinky/empty.syscfg @@ -0,0 +1,20 @@ +/** + * These arguments were used when this file was generated. They will be automatically applied on subsequent loads + * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. + */ +//@cliArgs --device "MSPM0G350X" --package "LQFP-64(PM)" --part "Default" +//@v2CliArgs --device "MSPM0G3507" --package "LQFP-64(PM)" +// @cliArgs --board /ti/boards/LP_MSPM0G3507 --rtos nortos + +/** + * Import the modules used in this configuration. + */ +const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL"); + +/** + * Write custom configuration values to the imported modules. + */ + +const Board = scripting.addModule("/ti/driverlib/Board", {}, false); + +SYSCTL.forceDefaultClkConfig = true; diff --git a/myapps/blinky/src/main.c b/myapps/blinky/src/main.c new file mode 100644 index 0000000..21140a9 --- /dev/null +++ b/myapps/blinky/src/main.c @@ -0,0 +1,10 @@ + +#include "ti_msp_dl_config.h" + +int main(void) +{ + SYSCFG_DL_init(); + + while (1) { + } +} diff --git a/myapps/blinky/startup_mspm0g350x_gcc.c b/myapps/blinky/startup_mspm0g350x_gcc.c new file mode 100644 index 0000000..8777f26 --- /dev/null +++ b/myapps/blinky/startup_mspm0g350x_gcc.c @@ -0,0 +1,221 @@ +/***************************************************************************** + + Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ + +#include + +/* Entry point for the application. */ +extern void SystemInit(void); +extern int main( void ); + +extern uint32_t __data_load__; +extern uint32_t __data_start__; +extern uint32_t __data_end__; +extern uint32_t __ramfunct_load__; +extern uint32_t __ramfunct_start__; +extern uint32_t __ramfunct_end__; +extern uint32_t __bss_start__; +extern uint32_t __bss_end__; +extern uint32_t __StackTop; + +typedef void( *pFunc )( void ); + +/* Forward declaration of the default fault handlers. */ +void Default_Handler(void); +extern void Reset_Handler (void) __attribute__((weak)); +extern void __libc_init_array(void); +extern void _init (void) __attribute__((weak, alias("initStub"))); +void initStub(void){;} + +/* Processor Exceptions */ +extern void NMI_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void HardFault_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SVC_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void PendSV_Handler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SysTick_Handler (void) __attribute__((weak, alias("Default_Handler"))); + +/* Device Specific Interrupt Handlers */ +extern void GROUP0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void GROUP1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG8_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART3_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void ADC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void ADC1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void CANFD0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void DAC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SPI0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void SPI1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART2_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void UART0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG6_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMA0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMA1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG7_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void TIMG12_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void I2C0_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void I2C1_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void AES_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void RTC_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); +extern void DMA_IRQHandler (void) __attribute__((weak, alias("Default_Handler"))); + + +/* Interrupt vector table. Note that the proper constructs must be placed on this to */ +/* ensure that it ends up at physical address 0x0000.0000 or at the start of */ +/* the program if located at a start address other than 0. */ +void (* const interruptVectors[])(void) __attribute__ ((used)) __attribute__ ((section (".intvecs"))) = +{ + (pFunc)&__StackTop, /* The initial stack pointer */ + Reset_Handler, /* The reset handler */ + NMI_Handler, /* The NMI handler */ + HardFault_Handler, /* The hard fault handler */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + SVC_Handler, /* SVCall handler */ + 0, /* Reserved */ + 0, /* Reserved */ + PendSV_Handler, /* The PendSV handler */ + SysTick_Handler, /* SysTick handler */ + GROUP0_IRQHandler, /* GROUP0 interrupt handler */ + GROUP1_IRQHandler, /* GROUP1 interrupt handler */ + TIMG8_IRQHandler, /* TIMG8 interrupt handler */ + UART3_IRQHandler, /* UART3 interrupt handler */ + ADC0_IRQHandler, /* ADC0 interrupt handler */ + ADC1_IRQHandler, /* ADC1 interrupt handler */ + CANFD0_IRQHandler, /* CANFD0 interrupt handler */ + DAC0_IRQHandler, /* DAC0 interrupt handler */ + 0, /* Reserved */ + SPI0_IRQHandler, /* SPI0 interrupt handler */ + SPI1_IRQHandler, /* SPI1 interrupt handler */ + 0, /* Reserved */ + 0, /* Reserved */ + UART1_IRQHandler, /* UART1 interrupt handler */ + UART2_IRQHandler, /* UART2 interrupt handler */ + UART0_IRQHandler, /* UART0 interrupt handler */ + TIMG0_IRQHandler, /* TIMG0 interrupt handler */ + TIMG6_IRQHandler, /* TIMG6 interrupt handler */ + TIMA0_IRQHandler, /* TIMA0 interrupt handler */ + TIMA1_IRQHandler, /* TIMA1 interrupt handler */ + TIMG7_IRQHandler, /* TIMG7 interrupt handler */ + TIMG12_IRQHandler, /* TIMG12 interrupt handler */ + 0, /* Reserved */ + 0, /* Reserved */ + I2C0_IRQHandler, /* I2C0 interrupt handler */ + I2C1_IRQHandler, /* I2C1 interrupt handler */ + 0, /* Reserved */ + 0, /* Reserved */ + AES_IRQHandler, /* AES interrupt handler */ + 0, /* Reserved */ + RTC_IRQHandler, /* RTC interrupt handler */ + DMA_IRQHandler, /* DMA interrupt handler */ + +}; + +/* Forward declaration of the default fault handlers. */ +/* This is the code that gets called when the processor first starts execution */ +/* following a reset event. Only the absolutely necessary set is performed, */ +/* after which the application supplied entry() routine is called. Any fancy */ +/* actions (such as making decisions based on the reset cause register, and */ +/* resetting the bits in that register) are left solely in the hands of the */ +/* application. */ +void Reset_Handler(void) +{ + uint32_t *pui32Src, *pui32Dest; + uint32_t *bs, *be; + + // + // Copy the data segment initializers from flash to SRAM. + // + pui32Src = &__data_load__; + for(pui32Dest = &__data_start__; pui32Dest < &__data_end__; ) + { + *pui32Dest++ = *pui32Src++; + } + + // + // Copy the ramfunct segment initializers from flash to SRAM. + // + pui32Src = &__ramfunct_load__; + for(pui32Dest = &__ramfunct_start__; pui32Dest < &__ramfunct_end__; ) + { + *pui32Dest++ = *pui32Src++; + } + + // Initialize .bss to zero + bs = &__bss_start__; + be = &__bss_end__; + while (bs < be) + { + *bs = 0; + bs++; + } + + /* + * System initialization routine can be called here, but it's not + * required for MSPM0. + */ + // SystemInit(); + + // + // Initialize virtual tables, along executing init, init_array, constructors + // and preinit_array functions + // + __libc_init_array(); + + // + // Call the application's entry point. + // + main(); + + // + // If we ever return signal Error + // + HardFault_Handler(); +} + +/* This is the code that gets called when the processor receives an unexpected */ +/* interrupt. This simply enters an infinite loop, preserving the system state */ +/* for examination by a debugger. */ +void Default_Handler(void) +{ + /* Enter an infinite loop. */ + while(1) + { + } +} diff --git a/myapps/blinky/startup_mspm0g350x_gcc.obj b/myapps/blinky/startup_mspm0g350x_gcc.obj new file mode 100644 index 0000000..4e8bc89 Binary files /dev/null and b/myapps/blinky/startup_mspm0g350x_gcc.obj differ diff --git a/myapps/blinky/ti_msp_dl_config.c b/myapps/blinky/ti_msp_dl_config.c new file mode 100644 index 0000000..eda8bc6 --- /dev/null +++ b/myapps/blinky/ti_msp_dl_config.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2023, Texas Instruments Incorporated + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ============ ti_msp_dl_config.c ============= + * Configured MSPM0 DriverLib module definitions + * + * DO NOT EDIT - This file is generated for the MSPM0G350X + * by the SysConfig tool. + */ + +#include "ti_msp_dl_config.h" + +/* + * ======== SYSCFG_DL_init ======== + * Perform any initialization needed before using any board APIs + */ +SYSCONFIG_WEAK void SYSCFG_DL_init(void) +{ + SYSCFG_DL_initPower(); + SYSCFG_DL_GPIO_init(); + /* Module-Specific Initializations*/ + SYSCFG_DL_SYSCTL_init(); +} + +SYSCONFIG_WEAK void SYSCFG_DL_initPower(void) +{ + DL_GPIO_reset(GPIOA); + DL_GPIO_reset(GPIOB); + + DL_GPIO_enablePower(GPIOA); + DL_GPIO_enablePower(GPIOB); + delay_cycles(POWER_STARTUP_DELAY); +} + +SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void) +{ + +} + + +SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void) +{ + + //Low Power Mode is configured to be SLEEP0 + DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0); + + DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE); + /* Set default configuration */ + DL_SYSCTL_disableHFXT(); + DL_SYSCTL_disableSYSPLL(); + DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_1); + DL_SYSCTL_setMCLKDivider(DL_SYSCTL_MCLK_DIVIDER_DISABLE); + +} + + diff --git a/myapps/blinky/ti_msp_dl_config.h b/myapps/blinky/ti_msp_dl_config.h new file mode 100644 index 0000000..b6f0d1f --- /dev/null +++ b/myapps/blinky/ti_msp_dl_config.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2023, Texas Instruments Incorporated - http://www.ti.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ============ ti_msp_dl_config.h ============= + * Configured MSPM0 DriverLib module declarations + * + * DO NOT EDIT - This file is generated for the MSPM0G350X + * by the SysConfig tool. + */ +#ifndef ti_msp_dl_config_h +#define ti_msp_dl_config_h + +#define CONFIG_MSPM0G350X +#define CONFIG_MSPM0G3507 + +#if defined(__ti_version__) || defined(__TI_COMPILER_VERSION__) +#define SYSCONFIG_WEAK __attribute__((weak)) +#elif defined(__IAR_SYSTEMS_ICC__) +#define SYSCONFIG_WEAK __weak +#elif defined(__GNUC__) +#define SYSCONFIG_WEAK __attribute__((weak)) +#endif + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * ======== SYSCFG_DL_init ======== + * Perform all required MSP DL initialization + * + * This function should be called once at a point before any use of + * MSP DL. + */ + + +/* clang-format off */ + +#define POWER_STARTUP_DELAY (16) + + +#define CPUCLK_FREQ 32000000 + + + +/* clang-format on */ + +void SYSCFG_DL_init(void); +void SYSCFG_DL_initPower(void); +void SYSCFG_DL_GPIO_init(void); +void SYSCFG_DL_SYSCTL_init(void); + + +#ifdef __cplusplus +} +#endif + +#endif /* ti_msp_dl_config_h */ diff --git a/myapps/blinky/ti_msp_dl_config.obj b/myapps/blinky/ti_msp_dl_config.obj new file mode 100644 index 0000000..4a62396 Binary files /dev/null and b/myapps/blinky/ti_msp_dl_config.obj differ diff --git a/myapps/empty/Makefile b/myapps/empty/Makefile new file mode 100644 index 0000000..caffc19 --- /dev/null +++ b/myapps/empty/Makefile @@ -0,0 +1,160 @@ +###################################### +# target +###################################### +TARGET = mspm0_blinky +#PART = STM32G030xx +#PYOCD_TARGET = stm32g030f6px + + +###################################### +# building variables +###################################### +# debug build? +DEBUG = 1 +# optimization for size +OPT = -Os + + +####################################### +# paths +####################################### +# Build path +BUILD_DIR = build +VND_DIR = ../../mspm0-sdk + +###################################### +# source +###################################### +# C sources +C_SOURCES += \ + $(VND_DIR)/source/ti/devices/msp/m0p/startup_system_files/gcc/startup_mspm0g350x_gcc.c \ + ti_msp_dl_config.c \ + src/main.c + + +# ASM sources +#ASM_SOURCES = + + +####################################### +# binaries +####################################### +PREFIX = arm-none-eabi- + +CC = $(PREFIX)gcc +CP = $(PREFIX)objcopy +#SZ = $(PREFIX)size + +BIN = $(CP) -O binary -S + +####################################### +# CFLAGS +####################################### + +ifeq ($(DEBUG), 1) +#DEBUG_FLAGS = -gdwarf-3 +DEBUG_FLAGS = -g -gstrict-dwarf +endif + +# cpu +CPU = \ + -mcpu=cortex-m0plus \ + -march=armv6-m \ + -mthumb \ + -std=c99 \ + -mfloat-abi=soft \ + +DEFINES = -D__MSPM0G3507__ + +# fpu +FPU = + +# float-abi +FLOAT-ABI = + +# mcu +MCU = $(CPU) $(FPU) $(FLOAT-ABI) + +# C includes +C_INCLUDES += \ + -I. \ + -Isrc/inc \ + -I$(VND_DIR)/source/third_party/CMSIS/Core/Include \ + -I$(VND_DIR)/source + +# compile gcc flags +ADDN_CFLAGS = \ + -Wall \ + -fdata-sections \ + -ffunction-sections + +CFLAGS = $(MCU) $(ADDN_CFLAGS) $(C_INCLUDES) $(DEBUG_FLAGS) $(OPT) $(DEFINES) + + +# Generate dependency information +#CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" + + +#ASFLAGS = $(MCU) $(DEBUG_FLAGS) $(OPT) -Wa,--warn + +####################################### +# LDFLAGS +####################################### +# link script +LDSCRIPT = device_linker.lds + +LIBDIR = +LDFLAGS = \ + $(MCU) \ + "-L$(VND_DIR)/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x" \ + -l:driverlib.a \ + -T $(LDSCRIPT) \ + -nostartfiles \ + -Wl,-Map=$(BUILD_DIR)/$(TARGET).map \ + -static \ + -Wl,--gc-sections \ + "-L/usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp" \ + -lgcc -lc -lm \ + --specs=nano.specs \ + --specs=nosys.specs \ + -Wl,--print-memory-usage \ + -Wl,--no-warn-rwx-segments + +# default action: build all +all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).bin + + +####################################### +# build the application +####################################### +# list of objects +OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) +vpath %.c $(sort $(dir $(C_SOURCES))) + +# list of ASM program objects +#OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) +#vpath %.s $(sort $(dir $(ASM_SOURCES))) + +$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR) + $(CC) -c $(CFLAGS) $< -o $@ + +#$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR) +# $(CC) -c $(ASFLAGS) $< -o $@ + +#$(LUAOBJECTS) $(OBJECTS) +$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile + $(CC) $(OBJECTS) $(LDFLAGS) -o $@ + +$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR) + $(BIN) $< $@ + +$(BUILD_DIR): + mkdir $@ + +####################################### +# clean up +####################################### +clean: + -rm -fR $(BUILD_DIR) + +# *** EOF *** diff --git a/myapps/empty/Makefile.bkp b/myapps/empty/Makefile.bkp new file mode 100644 index 0000000..6cee42a --- /dev/null +++ b/myapps/empty/Makefile.bkp @@ -0,0 +1,159 @@ +###################################### +# target +###################################### +TARGET = mspm0_blinky +#PART = STM32G030xx +#PYOCD_TARGET = stm32g030f6px + + +###################################### +# building variables +###################################### +# debug build? +DEBUG = 1 +# optimization for size +OPT = -Os + + +####################################### +# paths +####################################### +# Build path +BUILD_DIR = build +VND_DIR = ../../mspm0-sdk + +###################################### +# source +###################################### +# C sources +C_SOURCES += \ + $(VND_DIR)/source/ti/devices/msp/m0p/startup_system_files/gcc/startup_mspm0g350x_gcc.c \ + ti_msp_dl_config.c \ + src/main.c + + +# ASM sources +ASM_SOURCES = + + +####################################### +# binaries +####################################### +PREFIX = arm-none-eabi- + +CC = $(PREFIX)gcc +CP = $(PREFIX)objcopy +#SZ = $(PREFIX)size + +BIN = $(CP) -O binary -S + +####################################### +# CFLAGS +####################################### + +ifeq ($(DEBUG), 1) +#DEBUG_FLAGS = -gdwarf-3 +DEBUG_FLAGS = -g -gstrict-dwarf +endif + +# cpu +CPU = \ + -mcpu=cortex-m0plus \ + -march=armv6-m \ + -mthumb \ + -std=c99 \ + -mfloat-abi=soft \ + +DEFINES = -D__MSPM0G3507__ + +# fpu +FPU = + +# float-abi +FLOAT-ABI = + +# mcu +MCU = $(CPU) $(FPU) $(FLOAT-ABI) + +# C includes +C_INCLUDES += \ + -I. \ + -Isrc/inc \ + -I$(VND_DIR)/source/third_party/CMSIS/Core/Include \ + -I$(VND_DIR)/source + +# compile gcc flags +ADDN_CFLAGS = \ + -Wall \ + -fdata-sections \ + -ffunction-sections + +CFLAGS = $(MCU) $(ADDN_CFLAGS) $(C_INCLUDES) $(DEBUG_FLAGS) $(OPT) $(DEFINES) + + +# Generate dependency information +#CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" + + +ASFLAGS = $(MCU) $(DEBUG_FLAGS) $(OPT) -Wa,--warn + +####################################### +# LDFLAGS +####################################### +# link script +LDSCRIPT = device_linker.lds + +LIBDIR = +LDFLAGS = \ + $(MCU) \ + -l:$(VND_DIR)/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x/driverlib.a \ + -T $(LDSCRIPT) \ + -nostartfiles \ + -Wl,-Map=$(BUILD_DIR)/$(TARGET).map \ + -static \ + -Wl,--gc-sections \ + "-L/usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp" \ + -lgcc -lc -lm \ + --specs=nano.specs \ + --specs=nosys.specs \ + -Wl,--print-memory-usage \ + -Wl,--no-warn-rwx-segments + +# default action: build all +all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).bin + + +####################################### +# build the application +####################################### +# list of objects +OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) +vpath %.c $(sort $(dir $(C_SOURCES))) + +# list of ASM program objects +OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) +vpath %.s $(sort $(dir $(ASM_SOURCES))) + +$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR) + $(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@ + +$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR) + $(CC) -c $(ASFLAGS) $< -o $@ + +#$(LUAOBJECTS) $(OBJECTS) +$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile + $(CC) $(OBJECTS) $(LDFLAGS) -o $@ + +$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR) + $(BIN) $< $@ + +$(BUILD_DIR): + mkdir $@ + +####################################### +# clean up +####################################### +clean: + -rm -fR $(BUILD_DIR) + +# *** EOF *** diff --git a/myapps/empty/Makefile.bkp1 b/myapps/empty/Makefile.bkp1 new file mode 100644 index 0000000..b99aea8 --- /dev/null +++ b/myapps/empty/Makefile.bkp1 @@ -0,0 +1,160 @@ +###################################### +# target +###################################### +TARGET = mspm0_blinky +#PART = STM32G030xx +#PYOCD_TARGET = stm32g030f6px + + +###################################### +# building variables +###################################### +# debug build? +DEBUG = 1 +# optimization for size +OPT = -Os + + +####################################### +# paths +####################################### +# Build path +BUILD_DIR = build +VND_DIR = ../../mspm0-sdk + +###################################### +# source +###################################### +# C sources +C_SOURCES += \ + $(VND_DIR)/source/ti/devices/msp/m0p/startup_system_files/gcc/startup_mspm0g350x_gcc.c \ + ti_msp_dl_config.c \ + src/main.c + + +# ASM sources +#ASM_SOURCES = + + +####################################### +# binaries +####################################### +PREFIX = arm-none-eabi- + +CC = $(PREFIX)gcc +CP = $(PREFIX)objcopy +#SZ = $(PREFIX)size + +BIN = $(CP) -O binary -S + +####################################### +# CFLAGS +####################################### + +ifeq ($(DEBUG), 1) +#DEBUG_FLAGS = -gdwarf-3 +DEBUG_FLAGS = -g -gstrict-dwarf +endif + +# cpu +CPU = \ + -mcpu=cortex-m0plus \ + -march=armv6-m \ + -mthumb \ + -std=c99 \ + -mfloat-abi=soft \ + +DEFINES = -D__MSPM0G3507__ + +# fpu +FPU = + +# float-abi +FLOAT-ABI = + +# mcu +MCU = $(CPU) $(FPU) $(FLOAT-ABI) + +# C includes +C_INCLUDES += \ + -I. \ + -Isrc/inc \ + -I$(VND_DIR)/source/third_party/CMSIS/Core/Include \ + -I$(VND_DIR)/source + +# compile gcc flags +ADDN_CFLAGS = \ + -Wall \ + -fdata-sections \ + -ffunction-sections + +CFLAGS = $(MCU) $(ADDN_CFLAGS) $(C_INCLUDES) $(DEBUG_FLAGS) $(OPT) $(DEFINES) + + +# Generate dependency information +#CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" + + +#ASFLAGS = $(MCU) $(DEBUG_FLAGS) $(OPT) -Wa,--warn + +####################################### +# LDFLAGS +####################################### +# link script +LDSCRIPT = device_linker.lds + +LIBDIR = +LDFLAGS = \ + $(MCU) \ + "-L$(VND_DIR)/source/ti/driverlib/lib/gcc/m0p/mspm0g1x0x_g3x0x" \ + -l:driverlib.a \ + -T $(LDSCRIPT) \ + -nostartfiles \ + -Wl,-Map=$(BUILD_DIR)/$(TARGET).map \ + -static \ + -Wl,--gc-sections \ + "-L/usr/lib/gcc/arm-none-eabi/14.2.1/thumb/nofp" \ + -lgcc -lc -lm \ + --specs=nano.specs \ + --specs=nosys.specs \ + -Wl,--print-memory-usage \ + -Wl,--no-warn-rwx-segments + +# default action: build all +all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).bin + + +####################################### +# build the application +####################################### +# list of objects +OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o))) +vpath %.c $(sort $(dir $(C_SOURCES))) + +# list of ASM program objects +#OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o))) +#vpath %.s $(sort $(dir $(ASM_SOURCES))) + +$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR) + $(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@ + +#$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR) +# $(CC) -c $(ASFLAGS) $< -o $@ + +#$(LUAOBJECTS) $(OBJECTS) +$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile + $(CC) $(OBJECTS) $(LDFLAGS) -o $@ + +$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR) + $(BIN) $< $@ + +$(BUILD_DIR): + mkdir $@ + +####################################### +# clean up +####################################### +clean: + -rm -fR $(BUILD_DIR) + +# *** EOF *** diff --git a/myapps/empty/device_linker.lds b/myapps/empty/device_linker.lds new file mode 100644 index 0000000..f280511 --- /dev/null +++ b/myapps/empty/device_linker.lds @@ -0,0 +1,201 @@ +/***************************************************************************** + + Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0; /* required amount of heap */ +_Min_Stack_Size = 0x80; /* required amount of stack */ + + +/* Specify the memory areas */ +MEMORY +{ + FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00020000 + SRAM (RWX) : ORIGIN = 0x20200000, LENGTH = 0x00008000 + BCR_CONFIG (R) : ORIGIN = 0x41C00000, LENGTH = 0x000000FF + BSL_CONFIG (R) : ORIGIN = 0x41C00100, LENGTH = 0x00000080 +} + +/* Note: SRAM length must match MPPC/MEMSS config! Please edit it manually. */ + +REGION_ALIAS("REGION_TEXT", FLASH); +REGION_ALIAS("REGION_PREINIT_ARRAY", FLASH); +REGION_ALIAS("REGION_INIT_ARRAY", FLASH); +REGION_ALIAS("REGION_FINI_ARRAY", FLASH); +REGION_ALIAS("REGION_BSS", SRAM); +REGION_ALIAS("REGION_NOINIT", SRAM); +REGION_ALIAS("REGION_DATA", SRAM); +REGION_ALIAS("REGION_STACK", SRAM); +REGION_ALIAS("REGION_HEAP", SRAM); +REGION_ALIAS("REGION_TEXT_RAM", SRAM); +REGION_ALIAS("REGION_ARM_EXIDX", FLASH); +REGION_ALIAS("REGION_ARM_EXTAB", FLASH); + +/* Define output sections */ +SECTIONS +{ + /* section for the interrupt vector area */ + PROVIDE (_intvecs_base_address = + DEFINED(_intvecs_base_address) ? _intvecs_base_address : 0x00000000); + + .intvecs (_intvecs_base_address) : AT (_intvecs_base_address) { + KEEP (*(.intvecs)) + } > REGION_TEXT + + PROVIDE (_vtable_base_address = + DEFINED(_vtable_base_address) ? _vtable_base_address : 0x20200000); + + .vtable (_vtable_base_address) (NOLOAD) : AT (_vtable_base_address) { + KEEP (*(.vtable)) + } > REGION_DATA + + .text : { + CREATE_OBJECT_SYMBOLS + KEEP (*(.text)) + . = ALIGN(0x8); + *(.text.*) + . = ALIGN(0x8); + KEEP (*(.ctors)) + . = ALIGN(0x8); + KEEP (*(.dtors)) + . = ALIGN(0x8); + KEEP (*(.init)) + . = ALIGN(0x8); + KEEP (*(.fini*)) + . = ALIGN(0x8); + } > REGION_TEXT AT> REGION_TEXT + + .ramfunc : { + __ramfunct_load__ = LOADADDR (.ramfunc); + __ramfunct_start__ = .; + *(.ramfunc) + . = ALIGN(0x8); + __ramfunct_end__ = .; + } > REGION_TEXT_RAM AT> REGION_TEXT + + .rodata : { + *(.rodata) + . = ALIGN(0x8); + *(.rodata.*) + . = ALIGN(0x8); + } > REGION_TEXT AT> REGION_TEXT + + .preinit_array : { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)); + PROVIDE_HIDDEN (__preinit_array_end = .); + } > REGION_PREINIT_ARRAY AT> REGION_TEXT + + .init_array : { + . = ALIGN(0x8); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } > REGION_INIT_ARRAY AT> REGION_TEXT + + .fini_array : { + . = ALIGN(0x8); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(0x8); + } > REGION_FINI_ARRAY AT> REGION_TEXT + + .ARM.exidx : { + __exidx_start = .; + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + __exidx_end = .; + } > REGION_ARM_EXIDX AT> REGION_ARM_EXIDX + + .ARM.extab : { + . = ALIGN(0x8); + KEEP (*(.ARM.extab* .gnu.linkonce.armextab.*)) + . = ALIGN(0x8); + } > REGION_ARM_EXTAB AT> REGION_ARM_EXTAB + + __etext = .; + + .data : { + __data_load__ = LOADADDR (.data); + __data_start__ = .; + KEEP (*(.data)) + KEEP (*(.data*)) + . = ALIGN (8); + __data_end__ = .; + } > REGION_DATA AT> REGION_TEXT + + .bss : { + __bss_start__ = .; + *(.shbss) + KEEP (*(.bss)) + *(.bss.*) + *(COMMON) + . = ALIGN (8); + __bss_end__ = .; + } > REGION_BSS AT> REGION_BSS + + .noinit : { + /* place all symbols in input sections that start with .noinit */ + KEEP(*(*.noinit*)) + . = ALIGN (8); + } > REGION_NOINIT AT> REGION_NOINIT + + .heap : { + __heap_start__ = .; + end = __heap_start__; + _end = end; + __end = end; + KEEP (*(.heap)) + __heap_end__ = .; + __HeapLimit = __heap_end__; + } > REGION_HEAP AT> REGION_HEAP + + .stack (NOLOAD) : ALIGN(0x8) { + _stack = .; + KEEP(*(.stack)) + } > REGION_STACK AT> REGION_STACK + + .BCRConfig : + { + KEEP(*(.BCRConfig)) + } > BCR_CONFIG + + .BSLConfig : + { + KEEP(*(.BSLConfig)) + } > BSL_CONFIG + + __StackTop = ORIGIN(REGION_STACK) + LENGTH(REGION_STACK); + PROVIDE(__stack = __StackTop); +} diff --git a/myapps/empty/src/main.c b/myapps/empty/src/main.c new file mode 100644 index 0000000..21140a9 --- /dev/null +++ b/myapps/empty/src/main.c @@ -0,0 +1,10 @@ + +#include "ti_msp_dl_config.h" + +int main(void) +{ + SYSCFG_DL_init(); + + while (1) { + } +} diff --git a/myapps/empty/ti_msp_dl_config.c b/myapps/empty/ti_msp_dl_config.c new file mode 100644 index 0000000..eda8bc6 --- /dev/null +++ b/myapps/empty/ti_msp_dl_config.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2023, Texas Instruments Incorporated + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ============ ti_msp_dl_config.c ============= + * Configured MSPM0 DriverLib module definitions + * + * DO NOT EDIT - This file is generated for the MSPM0G350X + * by the SysConfig tool. + */ + +#include "ti_msp_dl_config.h" + +/* + * ======== SYSCFG_DL_init ======== + * Perform any initialization needed before using any board APIs + */ +SYSCONFIG_WEAK void SYSCFG_DL_init(void) +{ + SYSCFG_DL_initPower(); + SYSCFG_DL_GPIO_init(); + /* Module-Specific Initializations*/ + SYSCFG_DL_SYSCTL_init(); +} + +SYSCONFIG_WEAK void SYSCFG_DL_initPower(void) +{ + DL_GPIO_reset(GPIOA); + DL_GPIO_reset(GPIOB); + + DL_GPIO_enablePower(GPIOA); + DL_GPIO_enablePower(GPIOB); + delay_cycles(POWER_STARTUP_DELAY); +} + +SYSCONFIG_WEAK void SYSCFG_DL_GPIO_init(void) +{ + +} + + +SYSCONFIG_WEAK void SYSCFG_DL_SYSCTL_init(void) +{ + + //Low Power Mode is configured to be SLEEP0 + DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0); + + DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE); + /* Set default configuration */ + DL_SYSCTL_disableHFXT(); + DL_SYSCTL_disableSYSPLL(); + DL_SYSCTL_setULPCLKDivider(DL_SYSCTL_ULPCLK_DIV_1); + DL_SYSCTL_setMCLKDivider(DL_SYSCTL_MCLK_DIVIDER_DISABLE); + +} + + diff --git a/myapps/empty/ti_msp_dl_config.h b/myapps/empty/ti_msp_dl_config.h new file mode 100644 index 0000000..b6f0d1f --- /dev/null +++ b/myapps/empty/ti_msp_dl_config.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2023, Texas Instruments Incorporated - http://www.ti.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * ============ ti_msp_dl_config.h ============= + * Configured MSPM0 DriverLib module declarations + * + * DO NOT EDIT - This file is generated for the MSPM0G350X + * by the SysConfig tool. + */ +#ifndef ti_msp_dl_config_h +#define ti_msp_dl_config_h + +#define CONFIG_MSPM0G350X +#define CONFIG_MSPM0G3507 + +#if defined(__ti_version__) || defined(__TI_COMPILER_VERSION__) +#define SYSCONFIG_WEAK __attribute__((weak)) +#elif defined(__IAR_SYSTEMS_ICC__) +#define SYSCONFIG_WEAK __weak +#elif defined(__GNUC__) +#define SYSCONFIG_WEAK __attribute__((weak)) +#endif + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * ======== SYSCFG_DL_init ======== + * Perform all required MSP DL initialization + * + * This function should be called once at a point before any use of + * MSP DL. + */ + + +/* clang-format off */ + +#define POWER_STARTUP_DELAY (16) + + +#define CPUCLK_FREQ 32000000 + + + +/* clang-format on */ + +void SYSCFG_DL_init(void); +void SYSCFG_DL_initPower(void); +void SYSCFG_DL_GPIO_init(void); +void SYSCFG_DL_SYSCTL_init(void); + + +#ifdef __cplusplus +} +#endif + +#endif /* ti_msp_dl_config_h */ diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..738e318 --- /dev/null +++ b/readme.md @@ -0,0 +1,11 @@ + + +## TI mspm0 projects + +After cloning, + +``` +cd +git clone https://github.com/TexasInstruments/mspm0-sdk.git +``` +