move source to folder; openocd.sh programs directly

master
Clyne 2 years ago
parent fedc108c8f
commit 7fbb94cb15

2
.gitignore vendored

@ -1,3 +1,3 @@
ChibiOS_*/
build
.dep
.*

@ -102,33 +102,17 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l0xx.m
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32L0xx/platform.mk
include $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L011K4/board.mk
#include $(CHIBIOS)/os/hal/osal/os-less/ARMCMx/osal.mk
#include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional).
#include $(CHIBIOS)/os/nil/nil.mk
#include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
# Auto-build files in ./source recursively.
#include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
#include $(CHIBIOS)/test/lib/test.mk
#include $(CHIBIOS)/test/nil/nil_test.mk
#include $(CHIBIOS)/test/oslib/oslib_test.mk
include $(CHIBIOS)/tools/mk/autobuild.mk
# Define linker script file here
#LDSCRIPT= $(STARTUPLD)/STM32L011x4.ld
LDSCRIPT= ./STM32L011x4.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = $(ALLCSRC) \
$(TESTSRC) \
$(CHIBIOS)/os/hal/osal/lib/osal_vt.c \
2048.c \
buttons.c \
dogs.c \
flapbird.c \
main.c \
osal.c
$(CHIBIOS)/os/hal/osal/lib/osal_vt.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.

@ -1 +1 @@
sudo openocd -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/local/share/openocd/scripts/target/stm32l0.cfg
openocd -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/local/share/openocd/scripts/target/stm32l0.cfg -c "init; program build/ch.hex verify reset exit"

@ -138,11 +138,11 @@ void dogs_init_display()
dogs_reset();
CS_HIGH;
unsigned long int reset_sleep = (STM32_SYSCLK / 1000) * 100;
while (reset_sleep != 0) {
asm("nop; nop; nop; nop; nop");
reset_sleep -= 8;
}
unsigned long int reset_sleep = (STM32_SYSCLK / 1000) * 100;
while (reset_sleep != 0) {
asm("nop; nop; nop; nop; nop");
reset_sleep -= 8;
}
CS_LOW;
dogs_set_scroll_line(0);

@ -42,9 +42,9 @@ static void alarm_callback(RTCDriver *rtcp, rtcevent_t event)
static bool sleep = false;
bool sleep_button = (button_state & BUTTON_1) != 0;
bool sleep_button = (button_state & BUTTON_1) != 0;
if (sleep && !sleep_button)
return;
return;
RCC->ICSCR |= 6 << RCC_ICSCR_MSIRANGE_Pos;
dogs_set_sleep(false);
Loading…
Cancel
Save