Hello,
I am currently porting micropython for a project using an LPC1759. I want to have a FAT file system and execute files from the C code and not from the micropython REPL.
I tried to use the function pyexec_file but it didn't work and I cannot find any documentation about how to use it. I understand that I must implement mp_import_stat and mp_lexer_new_from_file but I don't know what pyexec_file is expecting those functions to do.
I use oofatfs lib for the FAT implementation and everything is working well. I can initialize the FS in the flash of my microcontroller and create some files. I can see the files when I mount the flash as a USB mass storage device. I can also execute the content of the file when I import it directly in the REPL using a serial interface so it is not a problem with the python code. By the way, the code is really simple, it just turns on some leds.
If someone could help me it would be great, I am looking for a solution for 2 days now and nothing is working.
Regards,
Orphee Antoniadis
Hello,
I am currently porting micropython for a project using an LPC1759. I want to have a FAT file system and execute files from the C code and not from the micropython REPL.
I tried to use the function
pyexec_filebut it didn't work and I cannot find any documentation about how to use it. I understand that I must implementmp_import_statandmp_lexer_new_from_filebut I don't know whatpyexec_fileis expecting those functions to do.I use oofatfs lib for the FAT implementation and everything is working well. I can initialize the FS in the flash of my microcontroller and create some files. I can see the files when I mount the flash as a USB mass storage device. I can also execute the content of the file when I import it directly in the REPL using a serial interface so it is not a problem with the python code. By the way, the code is really simple, it just turns on some leds.
If someone could help me it would be great, I am looking for a solution for 2 days now and nothing is working.
Regards,
Orphee Antoniadis