I’m trying to write a simple program that turns on and off a led of the STM32F303VC board, and at the same time, also prints “test” on the terminal.
Unfortunately, going to debug and opening the monitor, nothing comes out here. The debug is in continuous mode, and in fact the program works, it is only the output that does not come out…
Here is a screen to better understand the situation:
And here is the platformio.ini file that has not been modified by me:
[env:disco_f303vc]
platform = ststm32
board = disco_f303vc
framework = stm32cube
Finally, even if I don’t think it’s necessary, this is my MySTM32F303VC.h file:
#define __IO volatile /*!< Defines 'read / write' permissions */
typedef struct{
__IO unsigned int CR;
__IO unsigned int CFGR;
__IO unsigned int CIR;
__IO unsigned int APB2RSTR;
__IO unsigned int APB1RSTR;
union{__IO unsigned int AHBENR;
struct{
__IO unsigned DMA1EN:1;
__IO unsigned DMA2EN:1;
__IO unsigned SRAMEN:1;
__IO unsigned Res:1;
__IO unsigned FLITFEN:1;
__IO unsigned Res1:1;
__IO unsigned CRCEN:1;
__IO unsigned Res2:10;
__IO unsigned IOPAEN:1;
__IO unsigned IOPBEN:1;
__IO unsigned IOPCEN:1;
__IO unsigned IOPDEN:1;
__IO unsigned IOPEEN:1;
__IO unsigned IOPFEN:1;
__IO unsigned Res3:1;
__IO unsigned TSCEN:1;
__IO unsigned Res4:3;
__IO unsigned ADC12:1;
__IO unsigned ADC34:1;
__IO unsigned Res5:2;
};//END STRUCT ahbenr
};//end union AHBENR
__IO unsigned int APB2ENR;
__IO unsigned int APB1ENR;
__IO unsigned int BDCR;
__IO unsigned int CSR;
__IO unsigned int AHBRSTR;
__IO unsigned int CFGR2;
__IO unsigned int CFGR3;
}RCC_Type;
typedef struct{
union{__IO unsigned int MODER;
struct{
__IO unsigned MODER0:2;
__IO unsigned MODER1:2;
__IO unsigned MODER2:2;
__IO unsigned MODER3:2;
__IO unsigned MODER4:2;
__IO unsigned MODER5:2;
__IO unsigned MODER6:2;
__IO unsigned MODER7:2;
__IO unsigned MODER8:2;
__IO unsigned MODER9:2;
__IO unsigned MODER10:2;
__IO unsigned MODER11:2;
__IO unsigned MODER12:2;
__IO unsigned MODER13:2;
__IO unsigned MODER14:2;
__IO unsigned MODER15:2;
};
};
__IO unsigned int OTYPER;
__IO unsigned int OSPEEDR;
__IO unsigned int PUPDR;
union{ __IO unsigned int IDR;
struct{
__IO unsigned IDR0:1;
__IO unsigned IDR1:1;
__IO unsigned IDR2:1;
__IO unsigned IDR3:1;
__IO unsigned IDR4:1;
__IO unsigned IDR5:1;
__IO unsigned IDR6:1;
__IO unsigned IDR7:1;
__IO unsigned IDR8:1;
__IO unsigned IDR9:1;
__IO unsigned IDR10:1;
__IO unsigned IDR11:1;
__IO unsigned IDR12:1;
__IO unsigned IDR13:1;
__IO unsigned IDR14:1;
__IO unsigned IDR15:1;
};
};
union{ __IO unsigned int ODR;
struct{
__IO unsigned OR0:1;
__IO unsigned ODR1:1;
__IO unsigned ODR2:1;
__IO unsigned ODR3:1;
__IO unsigned ODR4:1;
__IO unsigned ODR5:1;
__IO unsigned ODR6:1;
__IO unsigned ODR7:1;
__IO unsigned ODR8:1;
__IO unsigned ODR9:1;
__IO unsigned ODR10:1;
__IO unsigned ODR11:1;
__IO unsigned ODR12:1;
__IO unsigned ODR13:1;
__IO unsigned ODR14:1;
__IO unsigned ODR15:1;
};
};
/*
__IO unsigned int BSRR;
__IO unsigned int LCKR;
__IO unsigned int AFRL;
__IO unsigned int AFRH;
__IO unsigned int BRR;
*/
}GPIO_Type;
#define Input 0
#define Output 1
#define Alternate 2
#define Analog 3
#define RCC ((RCC_Type*) 0x40021000)
#define GPIOA ((GPIO_Type*) 0x48000000)
#define GPIOE ((GPIO_Type*) 0x48001000)
On other software, by going to “Terminal I/O”, the word is printed correctly, I don’t know what the problem is.