I Have a source code written with C++ Math Calculation(.cpp + .h files). I can run it on desktop by compilling .dll/ .exe or .OS. Is there any chance to compile or run this code on STM32F4 Discovery Board. What should ı have to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-20 1:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-20 1:18 AM
Create in CubeIDE C++ project ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-20 1:46 AM
sory but ı hav basic level on this stm32. can u explain the critical steps. for example, should ı write my code as copy and paste or should ı add some lib headers or etc.
Thanks for your response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-20 7:30 AM
Install STMCubeIDE , run it create new project , choice your discovery board and C++.
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-21 5:57 AM
selected c/c++ project, selected c++ Manage Build, and under the executable file selected STM32F4xx C/C++ Project with Cross ARM Choice, and
Toolchain name: GNU Tools for ARM Embedded Processors (arm-none-eabi-gcc)
Toolchain path: ARM Embedded GCC ... and ı pressed finish.
now it bring an folders which includes GNU folders...
after that ı write simple code for demo:
#include <stdio.h>
int main() {
printf("Hello World\n");
return 0;
}
But it gives error..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-21 11:16 AM
- select...ST32 project -> select your board (F4disco) ...generate...put in code and -> debug
- printf( ... prints to what ? - and - : "helloWorld" here is more switch an LED on and off :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-21 11:45 AM
>>But it gives error..
Error says what?
The main() has nowhere to return too, and the printf() expects you to provide some plumbing that indicates where and how the data goes somewhere.
You are responsible from bringing up clock, pins, peripherals.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-21 1:10 PM
Here you can find helping hands for your project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-24 7:34 AM
Actually ı looking for pritng C++ stringCode the hello World output in a serial monitor by using COM connection. Is that Possible?
Probaly, If ı can figure out this way maybe ı can run my C++ Math Code in STM32...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-10-25 3:26 AM
on F4disco board should be STLink V2.1 ; this makes multi-USB device, for debug and a vcp (com port).
look for example in STM files, and disco manual, which USART is connected to stlink/serial .
