Homepage GitHub

CanardRxTransfer payload reading?

(kent.martin) #21

Seem I have the wrong version of arm-eabi-none-g++ .
Had a lot of trouble but finally got the newer version of compiler on there and it is building, yay!
I’ll try getting it to work now if I can find how the rom is arranged.
Where is the bootoader usually located?
The smaller flash pages are at the beginning (in the f4) so is the boot loader usually at the end?


(kent.martin) #22

Im trying to figure out how to use this code.
i.e. where is flash size defined?
I found flash offset, but can’t find where you are defining the processor in the code.
I am not sure if CAN is enabled in the sample you sent.
in halconf.h HAL_USE_CAN is defined false.
If I define it to true and define serial options to false it gets an error CAN driver activated but no CAN peripheral assigned.
Do I then need to define the CAN port in the mcuconf file similar to some of the mcuconf files similar to some of the stm32 demo versions under chibios?


(kent.martin) #23


Also How do I add another board?
Ia m using a f413 and it appears this type has not been used before.


(Pavel Kirienko) #24

All ARM-based microcontrollers known to me boot from 0x00000000 so the bootloader is always at the very beginning.

It’s in the linker script named ld.ld located in the root directory. This is where the size of the bootloader itself is defined as well.

This is correct. The sample does not use the CAN driver supplied by the operating system (it’s defective); instead, it uses the driver shipped with Libcanard, which requires no support from the operating system.

The MCU abstractions are managed by ChibiOS, so you should refer to its documentation. Briefly, in the Makefile you will find this section:

# MCU-specific OS includes
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk

Update it if necessary. Then edit src/os/halconf.h and src/os/board.h.