/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Running applications with OS 4.1

Username:     
Password:     
             

Forum

# 1   2010-09-29 01:31:56 Running applications with OS 4.1

vikram846
New member
Registered: 2010-08-25
Posts: 9

Running applications with OS 4.1

Hi,

I am sure everyone is having fun with their primers. Neat device!!

My question was :

How do I add my application.c into the circle os source files using Ride 7(primer2_circle.rprj), so I can modify the circle os to tailor my needs.?
Simply dropping the .c file doesnot work.



Thanks
Vik

Offline

 

# 2   2010-09-29 06:47:27 Running applications with OS 4.1

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Running applications with OS 4.1

Hi Vik,

What do you mean by $1 : it does not compile or does not run ?

You can add an item to a menu that call Application_Ini and Application_Handler.

You an also define your Application_Handler as a new handler (add it into the "SchHandler" array in "scheduler.c"), then your application will be called by the systick irq.

Regards
Yves

Offline

 

# 3   2010-09-29 11:36:02 Running applications with OS 4.1

vikram846
New member
Registered: 2010-08-25
Posts: 9

Re: Running applications with OS 4.1

Hi yrt,

When I drop a application.c that has a application ini and handler along with the other files,
it compiles.

It doesnot show in the primer 2. It says no application loaded.

Thanks
Vik.

Offline

 

# 4   2010-09-30 08:22:03 Running applications with OS 4.1

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Running applications with OS 4.1

Effectively, because normally, the CircleOS see the applications loaded thanks to the FAT table updated by the Circle manager tool, which also links the application to the good address area.
If you want to use your application in the same project that CircleOS, the best way is to call it from a menu as I said before.
You can do it from the main menu : modify the "MainMenu" structure in the "menu_spe.c" with replacing the second item :
      { " ",         fQuit,      0,  1 }
by your own item :
      { "MyApp ",  Application_Ini, Application_Handler,  1 }

Offline

 

# 5   2010-10-07 10:08:47 Running applications with OS 4.1

xuwa0800
Member
From: Sweden
Registered: 2010-05-20
Posts: 27

Re: Running applications with OS 4.1

yrt :

Effectively, because normally, the CircleOS see the applications loaded thanks to the FAT table updated by the Circle manager tool, which also links the application to the good address area.
If you want to use your application in the same project that CircleOS, the best way is to call it from a menu as I said before.
You can do it from the main menu : modify the "MainMenu" structure in the "menu_spe.c" with replacing the second item :
      { " ",         fQuit,      0,  1 }
by your own item :
      { "MyApp ",  Application_Ini, Application_Handler,  1 }

hello yrt,

i'm quite new to OS, and i'm a little bit confused about the menu item 'applic', is it possible to add my only application to this item, or applications can only be added to the place as you said just now. and another thing is about the 'fat', what 's that really, it seems some application are inside.

and are there some good tutorial for using the os, right now i'm reading 'circleos v4, conception document', but no example on it.

looking forward to your reply!

Last edited by xuwa0800 (2010-10-07 10:12:47)


/Wang

Offline

 

# 6   2010-10-07 13:17:41 Running applications with OS 4.1

jiffy
New member
Registered: 2010-10-06
Posts: 2

Re: Running applications with OS 4.1

how much can i expect to pay for a complete primer 2 and where from in britian in scotland including post and  packaging  and could this in theory be a fruit machine machine hacker potentially in rf mode i .e go all the way boards  y,dig  a pet project for the ambitious among us  thoughts on the matter please any time soon. also what is the max scan range in rf mode and why doesn,t evo supprt dual inter face.!! fruit machines work on a115200bauds  per sec. i am french y, know.

Last edited by jiffy (2010-10-07 13:22:29)

Offline

 

# 7   2010-10-11 06:55:48 Running applications with OS 4.1

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Running applications with OS 4.1

Hi xuwa0800,

Here you can find a simple tutorial from CircleOS application :
http://www.stm32circle.com/projects/project.php?id=53

Offline

 

# 8   2010-10-11 11:04:50 Running applications with OS 4.1

xuwa0800
Member
From: Sweden
Registered: 2010-05-20
Posts: 27

Re: Running applications with OS 4.1

yrt :

Hi xuwa0800,

Here you can find a simple tutorial from CircleOS application :
http://www.stm32circle.com/projects/project.php?id=53

hej yrt!

Thank you very much for your reply!

i have tried another simialar example, but the problem is that these examples have the os invisible, it will directly loaded to the processor(fat.elf and os.elf), and you can not change anything in os, for example i want to shut down the boring the welcome sound. and these can be done in the open source os by commenting the function.

then the problem comes to applition_ini and handler, in the example you recommended they have the ini and handler functions already in the appliction.c, and it can recognized by the os. in the open source os 3.7, i simplily add the ini and handler functions in menu.c (but if i put the funtions in a new file, it will not be recognized by os, said ptr_api something like that, wierd! i will struggle, some suggestions?), and make some changes of menu_handler, it works, but it will not be shown in the item applic.,still said no applic., that's because it is not in the FAT list, when applicationtable reads address, nothing inside.

so my question is how to add your applications in the fat that will be shown in the item applic. in the open source code os 3.7?  how to make os.elf  and fat.elf file, are there some sofeware for this purpose?

Last edited by xuwa0800 (2010-10-11 11:07:52)


/Wang

Offline

 

# 9   2010-10-11 11:59:06 Running applications with OS 4.1

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Running applications with OS 4.1

xuwa0800,

There is several questions in your post, and I'm not sure to know what you really want to do.

- if you just want to do an application and run it with CircleOS, the only way is to follow the tutorial (application project, build, debug with Ride7 thanks to the .elf file provided, or  launch of the "add to Circle" tool.
Note : the last CircleOS version owns the "Autorun" possibility that automatically launches the application when you start your Primer.

- if you want to do the same thing with a personalized OS, you can download the circleOS sources, modify it, then build it, and replace the "Primer2_Circle" file (result of the build) in your project.

- if you want to implement the application into the CircleOS (merge of the sources), you must "simulates" the presence of an application. So you have to fill the FAT, and the "header" of the application by your own code. Take a look at this document http://www.stm32circle.com/resources/do … eption.pdf paragraph "Software architecture".
But this is not the simplest way, and CircleOS is not made for that.

Yves

Offline

 

# 10   2010-10-11 17:30:38 Running applications with OS 4.1

xuwa0800
Member
From: Sweden
Registered: 2010-05-20
Posts: 27

Re: Running applications with OS 4.1

hej yrt!

i have tried it out, and it works quite fine! thank you very much!!!!

Last edited by xuwa0800 (2010-10-11 18:00:57)


/Wang

Offline

 

# 11   2010-10-14 09:17:52 Running applications with OS 4.1

saradabakesh
New member
Registered: 2010-10-14
Posts: 4

Re: Running applications with OS 4.1

Hey, this is the information for which I was searching for the same. As I also want to say you that this is really very fantastic information which you have shown here. As I also have tried that and working that much nice.

Offline

 

# 12   2010-11-29 20:37:56 Running applications with OS 4.1

rfarrow2010
Member
From: FL. USA
Registered: 2010-02-04
Posts: 14

Re: Running applications with OS 4.1

Is there anything special to make the 'autorun' funuction work?  I have replaced the Circle.elf that Ride7 uses. I have upgraded my Primer1 Circle_OS to V4.1 and confirmed this by looking at config About.   In the Primer1 config selection I have selected AuotRun- Yes. The Primer still opens to the main menu not my loaded application.

Offline

 

# 13   2010-11-30 07:04:05 Running applications with OS 4.1

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Running applications with OS 4.1

The Autorun function does the last application starting at the Primer power on. The application have to be run at least one time, and its name displayed in the main menu.
The configuration (so Autorun option also) is saved into CPU backup registers, what are powered by the battery. Be carefull the battery jumper is ON.
I checked now again the option on Primer1 and it works fine.

Offline

 

# 14   2010-11-30 19:26:43 Running applications with OS 4.1

rfarrow2010
Member
From: FL. USA
Registered: 2010-02-04
Posts: 14

Re: Running applications with OS 4.1

I wasn't using the battery in the debug mode. Works fine.  Thank you.

Offline

 

Board footer