From: arighi Date: Wed, 26 May 2010 13:36:37 +0000 (+0000) Subject: lm3s1968: add internal flash memory initialization to "empty" and "kernel" templates. X-Git-Tag: 2.5.0~78 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=83ea7ed8da72ed69c0ef12589a921694987504fa;p=bertos.git lm3s1968: add internal flash memory initialization to "empty" and "kernel" templates. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3839 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/boards/ek-lm3s1968/templates/empty/main.c b/boards/ek-lm3s1968/templates/empty/main.c index 9ca44575..b6df37c9 100644 --- a/boards/ek-lm3s1968/templates/empty/main.c +++ b/boards/ek-lm3s1968/templates/empty/main.c @@ -45,12 +45,15 @@ #include #include #include +#include /* Bitmap to display on the OLED display */ static Bitmap lcd_bitmap; /* Raster associated to the Bitmap image */ static uint8_t raster[RAST_SIZE(LCD_WIDTH, LCD_HEIGHT)]; - +/* Internal flash memory descriptor */ +static Flash flash; +/* UART port descriptor */ static Serial out; static void init(void) @@ -76,6 +79,8 @@ static void init(void) rit128x96_blitBitmap(&lcd_bitmap); /* Initialize the keypad driver */ kbd_init(); + /* Initialize the internal flash memory */ + flash_init(&flash); } int main(void) diff --git a/boards/ek-lm3s1968/templates/empty/project.bertos b/boards/ek-lm3s1968/templates/empty/project.bertos index 9cace4d6..e3b90efb 100644 --- a/boards/ek-lm3s1968/templates/empty/project.bertos +++ b/boards/ek-lm3s1968/templates/empty/project.bertos @@ -52,34 +52,36 @@ aS'kbd' p26 aS'formatwr' p27 -aS'kfile' +aS'flash' p28 -aS'lcd_rit128x96' +aS'kfile' p29 -aS'heap' +aS'lcd_rit128x96' p30 -aS'timer' +aS'heap' p31 -aS'debug' +aS'timer' p32 -aS'lm3s_ssi' +aS'debug' p33 -asS'CPU_NAME' +aS'lm3s_ssi' p34 -VLM3S1968 +asS'CPU_NAME' p35 -sS'PROJECT_HW_PATH' +VLM3S1968 p36 -S'../..' +sS'PROJECT_HW_PATH' p37 -sS'PROJECT_SRC_PATH' +S'../..' p38 -S'.' +sS'PROJECT_SRC_PATH' p39 -sS'PRESET' +S'.' p40 +sS'PRESET' +p41 I01 sS'OUTPUT' -p41 -(lp42 +p42 +(lp43 s. \ No newline at end of file diff --git a/boards/ek-lm3s1968/templates/kernel/main.c b/boards/ek-lm3s1968/templates/kernel/main.c index 99aa7057..68fdf45f 100644 --- a/boards/ek-lm3s1968/templates/kernel/main.c +++ b/boards/ek-lm3s1968/templates/kernel/main.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -53,7 +54,9 @@ static Bitmap lcd_bitmap; /* Raster associated to the Bitmap image */ static uint8_t raster[RAST_SIZE(LCD_WIDTH, LCD_HEIGHT)]; - +/* Internal flash memory descriptor */ +static Flash flash; +/* UART port descriptor */ static Serial out; static void init(void) @@ -79,6 +82,8 @@ static void init(void) rit128x96_blitBitmap(&lcd_bitmap); /* Initialize the keypad driver */ kbd_init(); + /* Initialize the internal flash memory */ + flash_init(&flash); /* * Kernel initialization: processes (allow to create and dispatch diff --git a/boards/ek-lm3s1968/templates/kernel/project.bertos b/boards/ek-lm3s1968/templates/kernel/project.bertos index de46c793..b4e22a3f 100644 --- a/boards/ek-lm3s1968/templates/kernel/project.bertos +++ b/boards/ek-lm3s1968/templates/kernel/project.bertos @@ -52,13 +52,13 @@ aS'kernel' p26 aS'kbd' p27 -aS'semaphores' -p28 aS'monitor' -p29 +p28 aS'formatwr' +p29 +aS'flash' p30 -aS'debug' +aS'semaphores' p31 aS'kfile' p32 @@ -70,24 +70,26 @@ aS'signal' p35 aS'timer' p36 -aS'lm3s_ssi' +aS'debug' p37 -asS'CPU_NAME' +aS'lm3s_ssi' p38 -VLM3S1968 +asS'CPU_NAME' p39 -sS'PROJECT_HW_PATH' +VLM3S1968 p40 -S'../..' +sS'PROJECT_HW_PATH' p41 -sS'PROJECT_SRC_PATH' +S'../..' p42 -S'.' +sS'PROJECT_SRC_PATH' p43 -sS'PRESET' +S'.' p44 +sS'PRESET' +p45 I01 sS'OUTPUT' -p45 -(lp46 +p46 +(lp47 s. \ No newline at end of file