So I have a problem. I am currently just coding some movement code, in python, to show off our robot at an upcoming school event. I think it should work, but I can’t deploy it. We are using make to make it easier, but when I do “make deploy” it gives me the error of “make: *** No rule to make target ‘deploy’. Stop.” What should I do?
The standard build systems for FRC don’t use Makefiles, so it sounds like you wrote something custom. What that error means is you need to add a target named “deploy” to the Makefile, that runs the appropriate commands (presumably calling a python script?) to actually do a deploy (e.g. runs a command that copies the files to the robot, etc). Are you using RobotPy?
Note that the Makefile syntax can be a little squirrely because the commands are required to start off with tab characters. That is, by far, the 1 problem that beginners have with Make.
So we are using Robotpy. Maybe I have to reinstall Make and Chocolatey? I’m pretty new to python so I’m not sure.
Robotpy doesn’t use makefiles normally, so whatever you are trying to run is likely custom, and without being able to see, help will be difficult. Can you post your project somewhere?
I think I have this setup correctly. Here is my current code.
The makefile there is completely empty.
My bad I must have forgotten to save it or something. It should be updated now and should work.
Reassess this assertion:
Why do you believe it will be easier?
I can count on one finger the number of teams I know trying to invoke robopy commands from make.
I’m asking because your thread title is about deploying code. However, your question is really more about specifics of Make. Can you give clarity to your end goals? It’s hard to advise a technical solution without knowing that.
My issue is more that when we used Make last year, it worked. At the start of this year, however, it stopped wanting to deploy, even when we used our normal deploy commands, it just wouldn’t work.
First of all, call it “Makefile”, not “Make.”
Second of all, your ‘deploy’ is trying to run your robot code. That’s not what you want.
You probably want to try “make roborio_install” But, the script that calls appears to have its own problems.
This is what you should do: skip make and makefiles right now. You need to figure out the actual commands to deploy your code to the rio. (these are the commands that you want make to run.) Once you get that working, then you can put them into a makefile to make your life easier.
So, a caution - this indicates a mindset that says “I can’t understand what’s going on” - that’s not going to help anyone, you need to focus on breaking the problem down into smaller and smaller bits until the sub-problems are tractable.
CEF has the same next step I’d recommend:
Does python robot.py deploy
work? If so, then we’re only talking about a make issue. If not, we need to stop talking about make and debug the real issue.
I’ll try when I get the chance.
Ok, so I tried the normal deploy, it still doesn’t work and this is the error message.
If I had to guess this is the reason make deploy isn’t working but I’m probably wrong.
Recognize what’s happening here: Python is looking for a file called “robot.py,” and not finding it. At bare minimum, you need to be in the directory where robot.py is located. Or, alternatively, you need to replace “robot.py” with the correct file name. [I’m not saying that will work – chances are, it just lets you move on to solving the next problem. But, at least that’s progress.]
Ok I monkied around with the placement of the file and got it to work, thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.