Ubuntu16 安装 STM32CubeMX

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weifengdq/article/details/81332802

安装

参考 64位Ubuntu 16.04安装STM32CubeMX-4.24.0

主要步骤记录如下:

#安装32位运行时库
sudo apt install libc6-i386
#安装jre
sudo apt install default-jre
#设置path, 参考 https://segmentfault.com/a/1190000001703180
sudo update-alternatives --config java
#选1 java-8
#安装STM32CubeMX, 注意文件名中的版本号可能不同
sudo ./SetupSTM32CubeMX-4.26.1.linux 

默认的安装路径是 /usr/local/STMicroelectronics/STM32Cube/STM32CubeMX, 我把它改成了 /home/karoto/Documents/app/STM32CubeMX, 安装完成后双击 STM32CubeMX即可打开. 之后是安装 STM32的嵌入式软件包. Ubuntu下的 STM32开发环境可以使用 TrueStudio

Tips

我安装的是4.26.1版本的STM32CubeMX, 似乎在Java 9下会出错, 所以在 sudo apt install default-jre 之后要检查一下path, 不知道怎么不小心安装了Java 9, 通过 sudo update-alternatives --config java 改成java 8, 一些记录:

karoto@karoto-PC:~/Downloads/lz/en.stm32cubemx$ sudo ./SetupSTM32CubeMX-4.26.1.linux 
chdir /home/karoto/Downloads/lz/en.stm32cubemx/.
current dir /home/karoto/Downloads/lz/en.stm32cubemx
Aug 11, 2018 4:04:18 PM INFO: Logging initialized at level 'INFO'
Aug 11, 2018 4:04:18 PM INFO: Commandline arguments: 
Aug 11, 2018 4:04:19 PM INFO: Detected platform: ubuntu_linux,version=4.15.0-30-generic,arch=x64,symbolicName=null,javaVersion=9-internal
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f616e921009, pid=3922, tid=3978
#
# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src)
# Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjava.so+0x1d009]  JNU_GetEnv+0x19
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/karoto/Downloads/lz/en.stm32cubemx/core.3922)
#
# An error report file with more information is saved as:
# /home/karoto/Downloads/lz/en.stm32cubemx/hs_err_pid3922.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)


karoto@karoto-PC:~/Downloads/lz/en.stm32cubemx$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-9-openjdk-amd64/bin/java       1091      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  2            /usr/lib/jvm/java-9-openjdk-amd64/bin/java       1091      manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode


karoto@karoto-PC:~/Downloads/lz/en.stm32cubemx$ sudo ./SetupSTM32CubeMX-4.26.1.linux 
chdir /home/karoto/Downloads/lz/en.stm32cubemx/.
current dir /home/karoto/Downloads/lz/en.stm32cubemx
Aug 11, 2018 4:09:53 PM INFO: Logging initialized at level 'INFO'
Aug 11, 2018 4:09:53 PM INFO: Commandline arguments: 
Aug 11, 2018 4:09:53 PM INFO: Detected platform: ubuntu_linux,version=4.15.0-30-generic,arch=x64,symbolicName=null,javaVersion=1.8.0_181
[ Writing the uninstaller data ... ]

猜你喜欢

转载自blog.csdn.net/weifengdq/article/details/81332802