Manually uploading Python scripts to V5 robot from Linux

Hi there, with the upcoming Spin Up season fast approaching, my team has been getting all our software and hardware development workflow workflows set up. As my team’s main programmer, as well as a Linux user, I have been trying to find ways to directly access the V5 brain’s flash storage to directly copy a python script to it. Although I am aware of the existence of PROS, I don’t really want to use it due to my relative lack of experience with C/C++, as well as the fact that no one else in my team would be able to contribute to the program.

Anyway, I guess this could be broken down into a few questions, so here goes.

Are python scripts on the V5 brain interpreted (using Micropython perhaps?) or are they somehow compiled before uploading to the robot?

Is it possible to get the V5 brain to expose its flash storage over USB?

Are there any tools to upload files to the V5 brain compatible with Linux?

I think someone like @jpearman said they are just stored as .py files

Not legally or using any tools available to the public.

Does vexcode V5 not download on linux? The only main platform for python is that. There is no direct way I believe

2 Likes

Not that I’m aware of. I’ve had some success running it through WINE (I’m currently the maintainer for it on the Win AppDB), although it appears that driver issues prevent it VEXCode from being able to detect the V5 brain.

You can use PROS tools to inspect and upload slot files even though they don’t come from PROS.

2 Likes

For example, for compiling/uploading VexCode projects from Linux, I have added this to the original VexCode project makefile:

ifeq ($(SLOT),)
ARGS :=
else
ARGS := --slot $(SLOT)
endif

ifneq ($(ICON),)
ARGS += --icon $(ICON)
else
ARGS += --icon USER926x.bmp
endif

ifneq ($(DESC),)
ARGS += --description $(DESC)
endif

upload: $(BUILD)/$(PROJECT).bin
        pros upload --target v5 --name $(PROJECT) $(ARGS) $(BUILD)/$(PROJECT).bin

run: $(BUILD)/$(PROJECT).bin
        pros upload --target v5 --name $(PROJECT) $(ARGS) --run-after --execute $(BUILD)/$(PROJECT).bin
        pros terminal --raw

It might be possible to upload Python projects in a similar manner, though I haven’t tried that. But the pros CLI tools do have commands capable of managing the “filesystem” on the V5 brain.

2 Likes

Awesome, thanks! I’ll take a look later today, and hopefully come back with some results soon