Error: could not load executable!

Writing software that controls the system and peripherals such as displays, SD cards, Buttons, LEDs, Serial Ports etc.
Post Reply
JEG
User
Posts: 6
Joined: Sat 2015-11-21 12:40

Error: could not load executable!

Post by JEG » Sat 2015-11-21 12:52

Hi,
My level of experience with VSOS is beginners level. I just received my vs1005 breakout board. I am trying to compile and run the Simple MP3 Player code. The code compiles OK, but when I try to run in debug mode I get the following error:

Loading system 'C:/VSIDE/plugins/emulator.system'...
Loading 'Emulation-Debug/MyProjectmp3new.coff'...
Error: could not load executable!

Any suggestions will be appreciated.

User avatar
Panu
VLSI Staff
Posts: 2426
Joined: Tue 2010-06-22 13:43

Re: Error: could not load executable!

Post by Panu » Sun 2015-11-22 9:15

You can't run VSOS programs via the emulator, you must copy the program (MyProjectmp3new.ap3) (which could be a too long file name) to the flash and run it from the flash, just as you would run a ready-made program such as "playfile song.mp3".

With the breakout board, it's easiest to get started with the UART SHELL. With the UART shell, you can use your board like it was a computer. Later you can automatize running programs, or perhaps add a LCD screen etc for a graphical interface.

To get the basic idea on how VSOS works, take a look at the educational videos at viewtopic.php?f=13&t=1273#p5655

and take a look at the UART shell thread to get a basic idea on how the command line works. viewtopic.php?f=13&t=1615

Then get the latest VSOS distribution, copy the "small_root" files to your breakout board's flash. Then you can use it from the uart shell command line, run programs you have written etc. viewtopic.php?f=13&t=680&start=50#p8242

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

JEG
User
Posts: 6
Joined: Sat 2015-11-21 12:40

Re: Error: could not load executable!

Post by JEG » Mon 2015-12-14 7:20

Thanks for the reply. So there is no way of using the debugger in VSIDE to step through code, set breakpoints, and view registers?

User avatar
Panu
VLSI Staff
Posts: 2426
Joined: Tue 2010-06-22 13:43

Re: Error: could not load executable!

Post by Panu » Mon 2015-12-14 9:53

Hi!

You can debug code that is loaded to the RAM via the IDE: that means executables that are running directly on the hardware and not loaded through the OS or called from the ROM. Since the debugger cannot place breakpoints into ROM, you lose control of your program when ROM functions are called.

Sometimes when I need to debug with the debugger something that runs on the VSOS, I make a custom kernel, e.g. take the kernel template and add a function (into main.c) and add a call to that function into kernel_main(). The kernel itself can be loaded using VSIDE UART and thus also the additions I have made to the custom kernel. That way I can debug VSIDE programs as long as I have set breakpoints into the RAM-loadable code.

I originally developed VSOS kernel itself using VSIDE's simulator and emulator, carefully not importing any ROM libraries or symbols.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply