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

Makefile:59: recipe for target 'clean' failed #69

Open
daanvV opened this issue Jun 10, 2021 · 10 comments
Open

Makefile:59: recipe for target 'clean' failed #69

daanvV opened this issue Jun 10, 2021 · 10 comments

Comments

@daanvV
Copy link

daanvV commented Jun 10, 2021

Using Windows 10, installed MinGW

I get the following error when doing this command:
(base) PS C:\XXXX\teensy_loader_cli-master> mingw32-make

Error:
rm -f teensy_loader_cli teensy_loader_cli.exe* process_begin: CreateProcess(NULL, rm -f teensy_loader_cli teensy_loader_cli.exe*, ...) failed. make (e=2): The system cannot find the file specified. Makefile:59: recipe for target 'clean' failed mingw32-make: *** [clean] Error 2

When I then do:
(base) PS C:\XXXteensy_loader_cli-master> teensy-loader-cli

I get:

teensy-loader-cli : The term 'teensy-loader-cli' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ teensy-loader-cli
+ ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (teensy-loader-cli:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Any help would be much appreciated!

@ZanzyTHEbar
Copy link

any luck on this? I get the same error

@PaulStoffregen
Copy link
Owner

Maybe you're missing the "rm" command. I believe in Windows a similar command is "del", though it might use different syntax than "-f". Probably easier to install a rm command somehow.

@ZanzyTHEbar
Copy link

ZanzyTHEbar commented Jun 23, 2022

yeah, i figured that out - so i tried on ubuntu but i can't seem to install MXE - MXE build fails and the binary install says the certificate is invalid - when i try to build without MXE - of course it can't find windows.h, which makes sense. So, i am at a loss of exactly how you compile your software. You claim it "just works" - but so far that is anything but true. Any guidance?

@PaulStoffregen
Copy link
Owner

Can you point to the specific "just works" claim? Maybe that info needs to be edited....

Personally, I have always compiled the Windows EXE using a Linux system with cross compiler. I don't really use Windows, so I can't help with how to set up compiler toolchains on Windows.

On Ubuntu Linux, you can just use apt-get to install the cross compiler, and then it does compile using the Makefile as-is.

@ZanzyTHEbar
Copy link

here is the source for the claim

Which cross-compiler do you use? It is not mentioned in the README. I tried to use MXE, with no luck.

@daanvV
Copy link
Author

daanvV commented Jul 8, 2022

Thanks for the above info, and FYI I still haven't managed to get this to work.

@PaulStoffregen I find your suggestion of cross compilation an interesting one. Considering that quite a few windows users are facing issues with this, it would be much appreciated if you could maybe write a short explanation of how to cross-compile for windows?
Or alternatively maybe put the .exe file that you are able to cross-compile from windows online? (as you mentioned in this post) So that other windows users don't have to go through the process of installing Linux to compile something for Windows.

Many thanks!

@ZanzyTHEbar
Copy link

ZanzyTHEbar commented Jul 8, 2022

Thanks for the above info, and FYI I still haven't managed to get this to work.

@PaulStoffregen I find your suggestion of cross compilation an interesting one. Considering that quite a few windows users are facing issues with this, it would be much appreciated if you could maybe write a short explanation of how to cross-compile for windows? Or alternatively maybe put the .exe file that you are able to cross-compile from windows online? (as you mentioned in this post) So that other windows users don't have to go through the process of installing Linux to compile something for Windows.

Many thanks!

If you still are doing this to get remote development working for the tyeensy 4.0 - i got it working. The newest platformio update has auto-reset and remote development support for the Teensy boards. I didn't need to cross-compile or replace the current teensy-cli. Just start a remote agent on your Host, setup the remote agent to allow a certain email to connect, on your remote dev machine login to Platformio IDE with the email/account associated with the remote agent and simply open the project. In the Project Tasks section there will be a Remote Development task that allows you to upload to the remote board and see the serial monitor :)

@daanvV
Copy link
Author

daanvV commented Jul 8, 2022

@ZanzyTHEbar , thanks for that tip :) My use case is somewhat different however. I want to be able to compile an Arduino file for a teensy board from a python file (hence why I thought using the command line tool would be useful).
So no need for uploading, remote development etc. Just plain simple compiling an .ino file from the command line.
If you have any tips then I am all ears! :D

@ZanzyTHEbar
Copy link

ZanzyTHEbar commented Jul 8, 2022

Well, you can't compile an ino file. An ino file is simply a text file extension unique to the Arduino IDE. The compiling of the IDE takes the ino and treats it as a .cpp or .cc or .c file.

If you want to generate code for a teensy from a python file, i would simply create a python script that could auto-generate the needed lines of code, use the python to create a new file with .cpp extension in some directory, then write the code you want to that file. Then, trigger a teensy cli compile run on that file.

You will need to ensure that your header files are also correctly generated (should you need any).

At the end of the day, you will be compiling your text files into a .hex and a .bin file. Those are the actual files that get uploaded to the board.

@daanvV
Copy link
Author

daanvV commented Jul 11, 2022

That seems to make sense, thanks :) so that means I still need teensy cli right? I.e. there is no way to do this without having teensy cli?

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

3 participants