/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Circle OS newbie question about coding

Username:     
Password:     
             

Forum

# 1   2010-03-03 23:22:59 Circle OS newbie question about coding

toalan
New member
Registered: 2009-02-21
Posts: 4

Circle OS newbie question about coding

Hi,

I do alot of embedded development stuff with 8 bit micros without an OS.

I ordered primer 2 last night and I am waiting for delivery.

I have no idea how to code to work with an OS.

From what I read, circle abstracts the hard stuff; LCD, mems, SDcard, etc...., but does not abstract most of the peripherials; ADC,timer, UART, I2C, etc....

When I code I suppose I call a function built into circle OS for drawing lines on the LCD. When I need to use I2C, I would have to setup the I2C registers myself according to the STM datasheets. It that correct so far?

For instance lets say I want to write a program that makes no explicit use of circle OS functions, would coding be just be as if there was no OS? By that I mean do I still need to make adjustments to my application for circle OS?

Can I just use GCC to build a normal non circle OS program and have that program run under Circle OS without problems?

Offline

 

# 2   2010-03-03 23:54:39 Circle OS newbie question about coding

ntrf.zns
Member
From: Belgorod, Russia
Registered: 2009-11-01
Posts: 134

Re: Circle OS newbie question about coding

In short:
Yes, you need to write a low-level code for some hardware functions.
Yes, you will have to use CircleOS functions for your application to work.
No, you can't build a basic program for device and use it with OS. It won't run.

CircleOS is a simple non-multitasking OS with no memory or privilege protection. This means that any CircleOS application can use any piece of hardware at any time. OS itself presents a convinient way to launch the programs and handles some complex tasks like dispatching drawing calls to LCD or handling touchscreen. You can write your program without using those.

CircleOS application depends on a custom linkage procedure which differs from normal program. The program needs to be relocated when other installed program already uses this program. The CircleOS application manager calculates the relocation address and link the program before sending it to Primer.

And in the end there is a special structure added to every CircleOS program which is useless to non-OS program. It contains program title, initialization function and handler address.

Offline

 

Board footer