![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
update for mbed-os-5.11 (and Nboard IHM-V2)
Revision 28:be81ea276c3a, committed 2019-01-09
- Comitter:
- jacquesolivierklein
- Date:
- Wed Jan 09 12:26:00 2019 +0000
- Parent:
- 27:edb6c6685907
- Commit message:
- update for mbed-os-5.11 (and IHM-V2)
Changed in this revision
diff -r edb6c6685907 -r be81ea276c3a IHM_V1.lib --- a/IHM_V1.lib Sat Feb 10 20:57:06 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://developer.mbed.org/teams/NBoard/code/IHM_V1/#a9e51ac904e2
diff -r edb6c6685907 -r be81ea276c3a IHM_V2.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IHM_V2.lib Wed Jan 09 12:26:00 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/NBoard/code/IHM_V2/#ad91067e3f6d
diff -r edb6c6685907 -r be81ea276c3a main.cpp --- a/main.cpp Sat Feb 10 20:57:06 2018 +0000 +++ b/main.cpp Wed Jan 09 12:26:00 2019 +0000 @@ -1,6 +1,6 @@ -// Title : mbed-os-irq-semaphore +// Title : mbed-os-isr-semaphore // Author: Jacques-Olivier Klein - IUT de CACHAN -// Date: 2018-02-10 +// Date: 2018-02-10 - rev. 2019-01-06 #include "mbed.h" #include "IHM.h" @@ -15,22 +15,22 @@ void thread_Semaphore(); void isrBP0 (); -Thread thread_waiting_for_semaphore (osPriorityNormal,DEFAULT_STACK_SIZE );; +Thread thread_waiting_for_semaphore (osPriorityNormal,OS_STACK_SIZE );; Semaphore mysemaphore(0); int main(void) { ihm.LCD_clear(); ihm.LCD_printf("irq-semaphore-%s %s",__DATE__,__TIME__); printf("mbed-os-irq-semaphore-%s %s\n\r",__DATE__,__TIME__); - printf("DEFAULT_STACK_SIZE:%d\n\r", DEFAULT_STACK_SIZE); + printf("DEFAULT_STACK_SIZE:%d\n\r", OS_STACK_SIZE); BP0_Interrupt.mode(PullUp); thread_waiting_for_semaphore.start(thread_Semaphore); BP0_Interrupt.fall(&isrBP0); while(1){ L0=!L0; - printf("* [pid-%d]Main \n\r",Thread::gettid()); - Thread::wait(200); + printf("* [pid-%d]Main \n\r",osThreadGetId()); + wait(0.200); } } @@ -42,7 +42,7 @@ while(1){ mysemaphore.wait(); L1=!L1; - printf(" * [pid-%d]Main \n\r",Thread::gettid()); + printf(" * [pid-%d]Semaphore \n\r",osThreadGetId()); } } \ No newline at end of file
diff -r edb6c6685907 -r be81ea276c3a mbed-os.lib --- a/mbed-os.lib Sat Feb 10 20:57:06 2018 +0000 +++ b/mbed-os.lib Wed Jan 09 12:26:00 2019 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#bcf7085d85b2811b5d68bdda192c754eadfb8f88 +https://github.com/ARMmbed/mbed-os/#c966348d3f9ca80843be7cdc9b748f06ea73ced0
diff -r edb6c6685907 -r be81ea276c3a readme.txt --- a/readme.txt Sat Feb 10 20:57:06 2018 +0000 +++ b/readme.txt Wed Jan 09 12:26:00 2019 +0000 @@ -1,10 +1,14 @@ -Title : mbed-os-irq-semaphore +Title : mbed-os-isr-semaphore Purpose: Simple application example with 1 thread -triggered by a irq through a semaphore. +triggered by a interrupt service routine (ISR) through a semaphore. Target: L432KC / Nboard (from IUT-Cachan) -Tested: yes +Tested: YES (2019-01-09) Author: Jacques-Olivier Klein - IUT de CACHAN -Date: 2018-02-10 -DEFAULT_STACK_SIZE=2048 -Libraries: mbed-os rev2741:bcf7085(26feb-2017) + IHMV1 (from IUT-Cachan) rev4:a9e51ac +Date: 2018-02-10 rev. 2019-01-09 +OS_STACK_SIZE=4096 +Libraries: mbed-os rev5345:c966348(03jan2019) + IHMV2 (from IUT-Cachan) rev6:ad91067 + +2019-01-06 : update mbed-os, IHMV1->V2, Thread::wait(int ms)-> wait(float s), +ThreadGettid->osThreadGetId, DEFLAULT_STACK_SIZE -> OS_STACK_SIZE, +L432KC Firmare update (ST-LINK) -> test OK. \ No newline at end of file