[ubuntu stm32]ubuntu stm32 develop envirment

本文详细介绍了在Ubuntu环境下,使用STM32CubeMX和SW4STM32进行STM32微控制器开发的全过程。从安装编译器、STM32CubeMX,到生成项目、编译代码,最后使用JLink下载固件。同时,提供了多种IDE选择,如Code::Blocks、Eclipse和VSCode,为开发者提供全面的开发流程指导。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Reference: https://www.instructables.com/id/Build-a-Program-for-STM32-MCU-Under-Linux/

Ubuntu下使用STM32CubeMX和SW4STM32进行开发 https://my.oschina.net/igiantpanda/blog/1618140

1.Install gcc compiler for stm32.

sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi

After installed:

2.Install STM32CubeMX

There is 2 method to use lib. First way, you can direct download lib without STM32CubeMx(not suggest to use), as following:

Download in stm32 official site: https://www.st.com/en/development-tools/stm32cubemx.html

Or use STM32CubeMx to auto generote a project, as following:

Download from https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stm32cubemx.license=1547121534992.product=STM32CubeMX.version=5.0.1.html

When you execute the STM32CubeMx, maybe suffer a proble, as below:

The reason is ubuntu is 64-bit system, but STM32CubeMx is 32-bit program, so we need to install libc6-i386, as below:

sudo apt install libc6-i386

And you also maybe meet another problem, as below:

So you need to install JRE, as below:

sudo apt install openjdk-8-jre

And now, you can open the installer as below:

3.Generate a demo project.

After installed, use command "./STM32CubeMX " to execute, as below:

Usage:

(1)Configure a new project: (If first time to use, will be download automatic).

If succeed, the project directory as below (already exit Makefile):

At lastj, input "make" to compile the project, output file is:

5.Dowload using JLInk, detail see other artcle.

 

5.stm32 IDE.

You can found the suported IDE on ST official site: https://www.st.com/en/development-tools/stm32-ides.html?querycriteria=productId=LN1200

 

5.Use Code::Blocks IDE.

sudo apt install codeblocks

 

(to be contiue ... )

6.Use eclipse IDE.

(to be contiue ... )

7.Use vscode IDE.

(to be contiue ... )

 

 

(end)

转载于:https://www.cnblogs.com/lizhuohui/p/10274375.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值