eugene-babichenko / cubemx2cmake Goto Github PK
View Code? Open in Web Editor NEWCommand line tool to generate CMakeLists.txt from STM32CubeMX project.
License: MIT License
Command line tool to generate CMakeLists.txt from STM32CubeMX project.
License: MIT License
Is it ok, that 'pip' script tries to install package as python2.7 ?
Finally I've got it installed by unstalling python3-pip package and calling 'pip3 install . '
Доброго дня!
В этой строке подставляется в имя ресурса значение MCU_LINE и получается:
file(GLOB_RECURSE CMSIS_STARTUP Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_STM32F103x8.s)
Такого файла не существует, есть файл:
file(GLOB_RECURSE CMSIS_STARTUP Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xb.s)
После правки вручную сборка проходит корректно.
The error happens because the mcu.Name set by stm32cubemx is less than 14 characters:
project.ioc
...
Mcu.Name=STM32F030K6Tx
....
Error message on the console:
File "/usr/local/lib/python2.7/site-packages/cubemx2cmake/command_line.py", line 80, in _main
print(mcu_username[:9]+"x"+cube_config["mcu.name"][13])
Is there a reason for cmake_minimum_required(VERSION 3.6)
?
The Ubuntu 16.04 LTS currently uses cmake 3.5.1
С первого раза не запустилось. Ошибка «Input file doesn't exist, is broken or access denied.». Отладка показала:
>>> cube_config.read_string("[section]\n"+open(cube_file).read())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/backports/configparser/__init__.py", line 728, in read_string
sfile = io.StringIO(string)
TypeError: initial_value must be unicode or None, not str
Объявление строки как unicode решило проблему. Cтрока 28:
cube_config.read_string(u«[section]\n"+open(cube_file).read())
После этого генерация прошла успешно.
I have tried both the pip repository as well as installing from git but both are not working for me. The program simply copies the template files to my project directory without even removing the .template extensions. It also does not change anything inside the template files.
Probably the problem is with latest STM32CubeMX (Version 4.20.1)
SW4STM32 generator places
system_stm32f1xx.c in /Src/ directory
startup_stm32f103xb.s in /startup/ directory
Может имеет смысл создавать папку build, если она отсутствует?
Тут примеры создания:
Creating a directory in CMake - Stack Overflow
Middleware files not included to build
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.