Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CubeMXImporter unable to find startup_x.s file #14

Open
C47D opened this issue Apr 5, 2018 · 2 comments
Open

CubeMXImporter unable to find startup_x.s file #14

C47D opened this issue Apr 5, 2018 · 2 comments

Comments

@C47D
Copy link

C47D commented Apr 5, 2018

Hi,

I got a problem when using this tool, i'm using CubeMX version 4.25.0.

\CubeMXImporter>python cubemximporter.py ..\projects\hello_cube2 ..\cubemx_out\nucleo64_f103rb
Traceback (most recent call last):
File "cubemximporter.py", line 544, in
cubeImporter.importCMSIS()
File "cubemximporter.py", line 318, in importCMSIS
shutil.copy(loc[0], loc[1])
File "C:\Python27\lib\shutil.py", line 133, in copy
copyfile(src, dst)
File "C:\Python27\lib\shutil.py", line 96, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '..\cubemx_out\nucleo64_f103rb\startup/startup_stm32f103xb.s'

CubeMX 4.25.0 places the startup file on the SW4STM32 directory:

(my cube project directory)\SW4STM32> dir
20/03/2018 05:00 p. m. 11,536 startup_stm32f103xb.s

So i think the script is searching the startup file on a wrong directory.
Can you reproduce the problem or i'm doing something wrong?

Regards,
Carlos

@C47D
Copy link
Author

C47D commented Apr 5, 2018

Modifying the script made it work, i don't know if this is special for Cube 4.25.0. Just noticed there's a special case handling the Cube version 4.19, should i add a special handling for Cube 4.25?
Let me know if this fix can become a pull request.

Regards,
Carlos

cubemximporter.zip

@C47D
Copy link
Author

C47D commented Apr 5, 2018

Sorry for the noise but i found the problem, when generating the project under root the startup file is located on the startup directory, this way this script works as expected.
When generating the project with the Generate under root checkbox unchecked the startup file is located on the root directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant