compiling and loading properly!

stable
Penguin 5 years ago
parent 0a1f202431
commit 560e3ef5ac

@ -1,17 +1,2 @@
#include "hal_sam_d2x.hpp" #include "hal_sam_d2x.hpp"
#define __SYSTEM_CLOCK (1000000)
uint32_t SystemCoreClock = __SYSTEM_CLOCK;
void hal::arm::sam_d2x::init()
{
// Keep the default device state after reset
SystemCoreClock = __SYSTEM_CLOCK;
return;
}
void hal::arm::sam_d2x::clock_update()
{
SystemCoreClock = __SYSTEM_CLOCK;
return;
}

@ -184,6 +184,7 @@ void I2S_Handler ( void );
*/ */
#include <core_cm0plus.h> #include <core_cm0plus.h>
#if !defined(DONT_USE_CMSIS_INIT) #if !defined(DONT_USE_CMSIS_INIT)
extern uint32_t SystemCoreClock;
void SystemInit(void); void SystemInit(void);
void SystemCoreClockUpdate(void); void SystemCoreClockUpdate(void);
#endif #endif

@ -16,7 +16,13 @@ int main(void);
void __libc_init_array(void); void __libc_init_array(void);
// Dummy Handler // Dummy Handler
static void Dummy_Handler(void); static void Dummy_Handler(void)
{
while(1)
{
}
}
#define __SYSTEM_CLOCK (1000000) #define __SYSTEM_CLOCK (1000000)
@ -232,12 +238,6 @@ void Reset_Handler(void)
while (1); while (1);
} }
void Dummy_Handler(void)
{
while(1){}
}
uint32_t SystemCoreClock = __SYSTEM_CLOCK; uint32_t SystemCoreClock = __SYSTEM_CLOCK;

@ -8,33 +8,6 @@
#endif #endif
#if !(defined(__ASSEMBLY__))
#include <stdint.h>
// #ifndef __cplusplus
// typedef volatile const uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
// typedef volatile const uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
// typedef volatile const uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int)
// #else
// typedef volatile uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
// typedef volatile uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
// typedef volatile uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int)
// #endif
typedef volatile const uint32_t RoReg; // Read only 32-bit register (volatile const unsigned int)
typedef volatile const uint16_t RoReg16; // Read only 16-bit register (volatile const unsigned int)
typedef volatile const uint8_t RoReg8; // Read only 8-bit register (volatile const unsigned int Ts)
typedef volatile uint32_t WoReg; // Write only 32-bit register (volatile unsigned int)
typedef volatile uint16_t WoReg16; // Write only 16-bit register (volatile unsigned int)
typedef volatile uint16_t WoReg8; // Write only 8-bit register (volatile unsigned int)
typedef volatile uint32_t RwReg; // Write only 32-bit register (volatile unsigned int)
typedef volatile uint16_t RwReg16; // Write only 16-bit register (volatile unsigned int)
typedef volatile uint8_t RwReg8; // Write only 8-bit register (volatile unsigned int)
#define CAST(type, value) ((type*)(value))
#define REG_ACCESS(type, address) (*(type*)(address))
#else
#define CAST(type, value) (value)
#define REG_ACCESS(type, address) (address)
#endif
namespace hal::arm namespace hal::arm
{ {

@ -0,0 +1,3 @@
load
monitor reset
q

@ -18,7 +18,7 @@ endif
# Tools # Tools
CC=arm-none-eabi-g++ CC=arm-none-eabi-g++
LD=arm-none-eabi-g++ LD=arm-none-eabi-gcc
AR=arm-none-eabi-ar AR=arm-none-eabi-ar
AS=arm-none-eabi-as AS=arm-none-eabi-as
@ -61,9 +61,9 @@ $(BUILD_DIR)/%.o: %.c
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
@echo "***************" @echo "***************"
@echo "Compiling $< ---> $@" @echo "Compiling $< ---> $@"
$(_ATSYM_)$(CC) -c $(CFLAGS) $< -o $@ $(_ATSYM_)arm-none-eabi-gcc -c $(CFLAGS) $< -o $@
@echo "Outputting Dependency from $< ---> "$(BUILD_DIR)/$*.d @echo "Outputting Dependency from $< ---> "$(BUILD_DIR)/$*.d
$(_ATSYM_)$(CC) -MM $(CFLAGS) $< > $(BUILD_DIR)/$*.d $(_ATSYM_)arm-none-eabi-gcc -MM $(CFLAGS) $< > $(BUILD_DIR)/$*.d
# compile and generate dependency info # compile and generate dependency info
$(BUILD_DIR)/%.o: %.cpp $(BUILD_DIR)/%.o: %.cpp

Binary file not shown.

@ -0,0 +1,11 @@
hal_sam_d2x.o: src/hal/hal_sam_d2x.cpp inc/hal/hal_sam_d2x.hpp \
inc/common/hal_arm.hpp conf/epenguin_conf.h inc/hdi/hdi_sam_d2x.h \
inc/common/epenguin_dev_arm_util.h inc/common/cmsis/core_cm0plus.h \
inc/common/cmsis/cmsis_version.h inc/common/cmsis/cmsis_compiler.h \
inc/common/cmsis/cmsis_gcc.h inc/hdi/hdi_ac.h inc/hdi/hdi_adc.h \
inc/hdi/hdi_dmac.h inc/hdi/hdi_dsu.h inc/hdi/hdi_eic.h \
inc/hdi/hdi_evsys.h inc/hdi/hdi_gclk.h inc/hdi/hdi_hmatrixb.h \
inc/hdi/hdi_i2s.h inc/hdi/hdi_mtb.h inc/hdi/hdi_nvmctrl.h \
inc/hdi/hdi_pac.h inc/hdi/hdi_pm.h inc/hdi/hdi_port.h inc/hdi/hdi_rtc.h \
inc/hdi/hdi_sercom.h inc/hdi/hdi_sysctrl.h inc/hdi/hdi_tc.h \
inc/hdi/hdi_tcc.h inc/hdi/hdi_usb.h inc/hdi/hdi_wdt.h

Binary file not shown.

@ -0,0 +1,10 @@
hdi_sam_d2x.o: src/hdi/hdi_sam_d2x.c inc/hdi/hdi_sam_d2x.h \
inc/common/epenguin_dev_arm_util.h inc/common/cmsis/core_cm0plus.h \
inc/common/cmsis/cmsis_version.h inc/common/cmsis/cmsis_compiler.h \
inc/common/cmsis/cmsis_gcc.h inc/hdi/hdi_ac.h inc/hdi/hdi_adc.h \
inc/hdi/hdi_dmac.h inc/hdi/hdi_dsu.h inc/hdi/hdi_eic.h \
inc/hdi/hdi_evsys.h inc/hdi/hdi_gclk.h inc/hdi/hdi_hmatrixb.h \
inc/hdi/hdi_i2s.h inc/hdi/hdi_mtb.h inc/hdi/hdi_nvmctrl.h \
inc/hdi/hdi_pac.h inc/hdi/hdi_pm.h inc/hdi/hdi_port.h inc/hdi/hdi_rtc.h \
inc/hdi/hdi_sercom.h inc/hdi/hdi_sysctrl.h inc/hdi/hdi_tc.h \
inc/hdi/hdi_tcc.h inc/hdi/hdi_usb.h inc/hdi/hdi_wdt.h

Binary file not shown.

@ -0,0 +1,11 @@
main.o: src/main.cpp inc/epenguin.hpp conf/epenguin_conf.h \
inc/hal/hal_sam_d2x.hpp inc/common/hal_arm.hpp inc/hdi/hdi_sam_d2x.h \
inc/common/epenguin_dev_arm_util.h inc/common/cmsis/core_cm0plus.h \
inc/common/cmsis/cmsis_version.h inc/common/cmsis/cmsis_compiler.h \
inc/common/cmsis/cmsis_gcc.h inc/hdi/hdi_ac.h inc/hdi/hdi_adc.h \
inc/hdi/hdi_dmac.h inc/hdi/hdi_dsu.h inc/hdi/hdi_eic.h \
inc/hdi/hdi_evsys.h inc/hdi/hdi_gclk.h inc/hdi/hdi_hmatrixb.h \
inc/hdi/hdi_i2s.h inc/hdi/hdi_mtb.h inc/hdi/hdi_nvmctrl.h \
inc/hdi/hdi_pac.h inc/hdi/hdi_pm.h inc/hdi/hdi_port.h inc/hdi/hdi_rtc.h \
inc/hdi/hdi_sercom.h inc/hdi/hdi_sysctrl.h inc/hdi/hdi_tc.h \
inc/hdi/hdi_tcc.h inc/hdi/hdi_usb.h inc/hdi/hdi_wdt.h

Binary file not shown.

@ -0,0 +1 @@
mcu.o: src/common/mcu.cpp

Binary file not shown.
Loading…
Cancel
Save