Become a leader in the IoT community!
New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!
People may need to see your code, this issue always catches me off in new projects have to spend an hour and it works
ok
i didn’t use the graphic approach
In `syscalls.c` file you need to add few more lines of code at the top. Here it is
/////////////////////////////////////////////////////////////////////////////////////////////////////////
// Implementation of printf like feature using ARM Cortex M3/M4/ ITM functionality
// This function will not work for ARM Cortex M0/M0+
// If you are using Cortex M0, then you can use semihosting feature of openOCD
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//Debug Exception and Monitor Control Register base address
#define DEMCR *((volatile uint32_t*) 0xE000EDFCU )
/* ITM register addresses */
#define ITM_STIMULUS_PORT0 *((volatile uint32_t*) 0xE0000000 )
#define ITM_TRACE_EN *((volatile uint32_t*) 0xE0000E00 )
void ITM_SendChar(uint8_t ch)
{
//Enable TRCENA
DEMCR |= ( 1 << 24); //enable stimulus port 0 ITM_TRACE_EN |= ( 1 << 0); // read FIFO status in bit [0]: while(!(ITM_STIMULUS_PORT0 & 1)); //Write to ITM stimulus port0 ITM_STIMULUS_PORT0 = ch; }
I have added this line of code
the output is not display
Also, confirm if in debugger settings you have setup properly especially to enable SWV & Clock settings. In your case may change for different clock speed if you’re not running @ 16MHz
Yes I have done that; enable the SWV and set clock speed to 84
This code seems like missing pointers to hold memory addresses. Please copy paste my suggested lines of code or compare both carefully. Following part of your code
ok
I have also used your suggested code line
do you think the problem could e from the hardware
And its my first time using this board
Unfortunately, I never used STM32 BlackPill. So it’ll be difficult for me to say anything
whether it’s an issue with stlinkv2 clones or something
ok
thanks for your effort
Welcome!
@elvisokpara did you update your clone st link programmer firmware ? If yes than u have bricked it
yes did
this there anything I can do about that?
but the upgrade was successful
yeah but few people have reported it, after the new 1.17 update if you update your firmware of the Chinese clone programmer via the stm32 cube programmer , it will be rendered it useless.
try using another or a new clone
one such reported case – https://youtu.be/LWoxFclaius?si=0idr8viCzFO_Rl2n
Recently, I’m using official STLINK-V3MODS programmer and debugger at just $ 9.30 ~ ₹ 792.00. You can even solder this programmer & debugger on a custom motherboard/pcb for field update!
@elvisokpara is it solved?
or should I help?
after seeing the picture of your stlink sadly it doesn’t have SWO capality
you need something like this to use that
see this has a SWO pin
now you can change your stlink or I can give you another suggestions that use printf via UART
if you need any help please mention me
CONTRIBUTE TO THIS THREAD