jserv / mini-arm-os

Build a minimal multi-tasking OS kernel for ARM from scratch
Other
1.06k stars 243 forks source link

08 cmsis #10

Closed TibaChang closed 8 years ago

TibaChang commented 8 years ago

Portable Version with CMSIS

TibaChang commented 8 years ago

The problem above are solved. "cmsis" becomes a submodule in this project!

TibaChang commented 8 years ago

I ckick the "close button" mindlessly!

TibaChang commented 8 years ago

All commits are squashed!

jserv commented 8 years ago

Please read coding-style.txt carefully.

jserv commented 8 years ago

Decouple git-submodule from the commit.

TibaChang commented 8 years ago
jserv commented 8 years ago

Please follow the naming convention of UNIX, which use "src" for "source" (via The Jargon File).

TibaChang commented 8 years ago
jserv commented 8 years ago

I am wondering how to avoid exposing the UART initialization. I think this is inevitable.

If you check the design of RExOS, you will figure out the techniques of platform abstractions including UART handling. File kernel/kstream.[ch] implement the generic UNIX-like interface functions associating a stream with opened files. We should minimize the invocation of peripherals in file os.c as possible as we can, so that we can maintain it easily.

TibaChang commented 8 years ago
typedef enum{
    USART,
}STREAM;                                                                                                                    
void stream_init(STREAM stream_type);
void stream_write(STREAM stream_type,const char *data);
TibaChang commented 8 years ago

Move core/include/uart.h into platform/[p103,f429disco]/include dir

jserv commented 8 years ago

README.md: check Comma and Space. We prefer "this is a string, indicating the type" over "his is a string,indicating the type".

jserv commented 8 years ago

You have to put the license notice in cmsis submodule, that is crucial for derived open source projects. Typically, file LICENSE.

jserv commented 8 years ago

Built upon STREAM abstraction, we can provide some shortcut functions such as puts and putc.

TibaChang commented 8 years ago
TibaChang commented 8 years ago

Change into:

    CONTROL_Type setPSP_Thread = {
        .b.nPRIV = 1,
        .b.SPSEL = 1
    };
TibaChang commented 8 years ago

Done!