now that my initial problems with SPI are solved I now cannot get my OLED running.
I wanted to use uGFX as the graphics library and I _think_ I did set it up correctly. Nothing fancy just some adjustments to ChibiOS.
I get it to compile and I can step into the execution with the debugger.
However, I get an error "unhandled exception" and it looks to me that this is caused by ChibiOS trying to access a memory address that is out of range.
The debugger tells me:
Code: Select all
ram gU8 * 0x20005027 <error: Cannot access memory at address 0x20005027>
I use a STM32F103RBT6 with 20 kB RAM. From my calculations (hoping they are correct) this would translate to 0x5000 RAM amount. Which would make the last memory address 0x2000 4fff in my understanding.
If this is correct, why would ChibiOS try to access 0x2000 5027? Also, the allocation of this memory does not throw an error but the first access to it does.
I defined the MCU in my board.h this way:
Code: Select all
/*
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
*/
#define STM32F103xB
in the Makefile there is
Code: Select all
# Target settings.
MCU = cortex-m3
…
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
…
# Define linker script file here
LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
I'm not sure about this line, this comes from the project I copied from:
Code: Select all
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
Any ideas what could be wrong? Any setting I'm missing?