/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Load program from SD card

Username:     
Password:     
             

Forum

# 1   2009-08-27 12:42:38 Load program from SD card

logictechs
Member
Registered: 2009-05-07
Posts: 68

Load program from SD card

Hi,

I was wondering if it is possible to have the CircleOS load new programs into flash from the SD card.  I'm trying to figure out a way for end users of the Primer2 to be able to load new programs without the need of the Ride software.  Is there perhaps a standalone software available to do this?

Offline

 

# 2   2009-08-27 15:12:57 Load program from SD card

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Load program from SD card

We have this idea in mind for future versions, but right now, it's not possible to load an application from the SD card (only or FLASH).
The diffulties are:
Today, the application is relocated at its final address (in FLASH). Within a uSD, the solution would be to copy the application to a fixed address in RAM, or to a fixed address in FLASH (but we would have to erase/reprogram the FLASH before launching any application).  But why not...

Offline

 

# 3   2009-08-27 15:54:20 Load program from SD card

logictechs
Member
Registered: 2009-05-07
Posts: 68

Re: Load program from SD card

Hi Francis,

Thanks for the response.  Perhaps a method of running the program from RAM after loading would be the easiest solution option.  Perhaps even implementing a BASIC like interpreter that would run the BASIC file from SD or RAM for even easier programming.  I understand this will slow things down but it would really open up door to more users looking for quick and easy programmable devices.

For now, would I be able to redistribute the loader program only to add programs I make for end users?  If so, please let me know what files exactly I need to do so.  Thanks!

Offline

 

# 4   2009-08-27 16:17:58 Load program from SD card

ShadowPhoenix
Member
Registered: 2009-02-11
Posts: 57

Re: Load program from SD card

I was thinking about loading linux from SD card. The problem is that you'd have to reload portions of the code into RAM constantly and freeing them. This would kill performance.

However, if you want to load a small (relatively) program from SD card then go ahead. Read it off and jump to it. *shrugs*

Offline

 

# 5   2009-08-28 01:56:49 Load program from SD card

logictechs
Member
Registered: 2009-05-07
Posts: 68

Re: Load program from SD card

Hi ShadowPhoenix,

Thanks for the reply.  To do the jump to code in RAM, I guessing you would load the hex file generated by Ride into a variable in RAM and use an assembly code of jmp to it?  Please explain if that is not correct.  Thanks.

Offline

 

# 6   2009-08-30 04:25:05 Load program from SD card

ShadowPhoenix
Member
Registered: 2009-02-11
Posts: 57

Re: Load program from SD card

logictechs :

Hi ShadowPhoenix,

Thanks for the reply.  To do the jump to code in RAM, I guessing you would load the hex file generated by Ride into a variable in RAM and use an assembly code of jmp to it?  Please explain if that is not correct.  Thanks.

Hmm, here's an idea I have.

Make 2 applications, the "load" one and the "dummy" one. The load one simply flashes the hex/elf file from SD card to the dummy application. This way you avoid having to work with FAT.

Unless you can run code from RAM - check datasheet on that.

Offline

 

# 7   2009-08-31 07:30:47 Load program from SD card

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Load program from SD card

Yes, we could reserve a range in the FLASH map for this purpose (at a fixed address).

Offline

 

Board footer