Hello,
I am trying to use the custom test transport for unit testing on a board.
I am trying to work with the processor on the b96b_f446ve board.
This is how my files look
Platformio.ini
[env:b96b_f446ve]
platform = ststm32
board = b96b_f446ve
framework = mbed
upload_protocol = stlink-v2
test_transport = custom
unittest_transport.h
#ifndef UNITTEST_TRANSPORT_H #define UNITTEST_TRANSPORT_H
void unittest_uart_begin(); void unittest_uart_putchar(char c); void unittest_uart_flush(); void unittest_uart_end();
#endif
unittest_transport.c
#include "unittest_transport.h" #include "mbed.h"
Serial testport(PC_10, PA_1);
void unittest_uart_begin() {
testport.baud(9600); }
void unittest_uart_putchar(char c) { testport.putc(c); }
void unittest_uart_flush() {
}
void unittest_uart_end() { // testport.close(); }
My test files are empty at the moment, but I figured that atleast it should compile fine and fail at the uploading stage.
However I get an error at the compiling stage for the tests.
Here is the screenshot
Anything I am doing wrong?? I went through the example given with the STM2cube and the nucleo_F401RE board and modelled my code after it.
Any help is greatly appreciated.
@ivankravets @valeros
Thank you guys for this wonderful addition. Platformio keeps getting better and better