I am working on my custom board with stm32h743vit6 MCU, I have seen a demo project for stm32h743, RT-STM32H743ZI_REV_XY-NUCLEO144, I have a copy of this project renamed to a new name, made some changes to the config files, the only needed peripherals are an UART (UART5 pins: PC12 and PD2) and a LED (pin: PA7) for blinking. it's all I need to start my chibios learning.
the NUCLEO H743 has a 144pin stm32h743zi, my board has a 100pin h743vit6, I have no idea how to change current config files, I have made some changes but no success blinking LED, please have a look at my config files and let me know if there are other changes needed to make it work.
my debugger is a st-link v2 and st_nucleo_h743zi.cfg file with openocd.
here is the result when start debug:
Code: Select all
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 2000 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK V2J40M27 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.245204
Info : stm32h7x.cpu0: Cortex-M7 r1p1 processor detected
Info : stm32h7x.cpu0: target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x08001724 psp: 0x200007e0
Info : Device: STM32H74x/75x
Info : flash size probed value 2048k
Info : STM32H7 flash has dual banks
Info : Bank (0) size is 1024 kb, base address is 0x08000000
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x08001724 psp: 0x200007e0
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000378 msp: 0x20000400
invalid command name "erase_address"
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000378 msp: 0x20000400
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000378 msp: 0x20000400
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000378 msp: 0x20000400
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000378 msp: 0x20000400
the main.c file:
Code: Select all
#include "ch.h"
#include "hal.h"
#include "rt_test_root.h"
#include "oslib_test_root.h"
#include "chprintf.h"
/*
* This is a periodic thread that does absolutely nothing except flashing
* a LED.
*/
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("blinker");
while (true) {
palSetLine(LINE_myLED1);
chThdSleepMilliseconds(500);
palClearLine(LINE_myLED1);
chThdSleepMilliseconds(500);
}
}
/*
* Application entry point.
*/
int main(void) {
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Activates the serial driver 1 using the driver default configuration.
*/
//sdStart(&SD3, NULL);
//sdStart(&SD5, NULL);
/*
* Creates the example thread.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO+1, Thread1, NULL);
/*
* Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
while (1) {
/*if (palReadLine(LINE_BUTTON)) {
test_execute((BaseSequentialStream *)&SD5, &rt_test_suite);
test_execute((BaseSequentialStream *)&SD5, &oslib_test_suite);
}*/
chThdSleepMilliseconds(500);
}
}
Regards,
Amir.