Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Make file missing seprator #41

Open
NoamYu opened this issue Sep 2, 2020 · 1 comment
Open

Make file missing seprator #41

NoamYu opened this issue Sep 2, 2020 · 1 comment

Comments

@NoamYu
Copy link

NoamYu commented Sep 2, 2020

I'm trying to convert a keil project to vscode using the script. after running the importKeilProject.py I'm trying to run the update script but I'm running into an error

Update started.

Existing '.vscode' folder used.
One STM32CubeMX file found: Main-boot.ioc
Existing 'Makefile' file will be restored from 'Makefile.backup'.
Copy of file (new name: Makefile): c:/Users/Noam.Yulzari/Documents/migrationTest/Main-Boot/Makefile.backup
Makefile 'print-variable' function added.
Valid 'buildData.json' file found.
Valid 'toolsPaths.json' file found.
'toolsPaths.json' file updated!
makefile:80: *** missing separator. Stop.

ERROR (0 seconds).
Unexpected error occured during 'Update' procedure. Exception:
Traceback (most recent call last):
File "c:/Users/Noam.Yulzari/Documents/migrationTest/Main-Boot/ideScripts/update.py", line 56, in
makefileData = makefile.getMakefileData(makeExePath, gccExePath)
File "c:\Users\Noam.Yulzari\Documents\migrationTest\Main-Boot\ideScripts\updateMakefile.py", line 109, in getMakefileData
projectName = self.getMakefileVariable(makeExePath, gccExePath, self.mkfStr.projectName)[0]
IndexError: list index out of range

I went to line 79 in the makefile and saw that '' is missing.

../SharedModules/Src/CommonFunctions.c
Boot/Src/Fonts.c
Src/main.c\

also, the file in this line appears twice (again in line 120). When I'm trying to edit to the makefile to fix these issues when running the update script again the makefile returned to the initial state.

@schperplata
Copy link
Member

This is usually the problem while you are using CubeMX simultaneously. Seems like CubeMX cache Makefile data and when python script also changes Makefile, it is not up-to-date. Or some other combination of already modified Makefile/CubeMX/py script.

I suggest you close CubeMX, remove all available Makefiles and regenerate the project. Makefile is modified by py script so it is possible to get its variables.

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

No branches or pull requests

2 participants