This is sample program for Nucleo L152RE (and F401RE & F411RE) mbed-rtos. You need to modify mbed-src and mbed-rtos before compile it.
Dependencies: mbed-rtos mbed-src SetRTC
Fork of GR-PEACH_test_on_rtos_works_well by
Please refer below link.
/users/kenjiArai/notebook/necleo-l152re-rtos-sample-also-for-f401re--f411re-/
debug_tools_L152_F4x1RE/mon_hw_common.h
- Committer:
- kenjiArai
- Date:
- 2015-05-20
- Revision:
- 13:d0d1da1fae4c
- Parent:
- 10:1c0f58b9c048
File content as of revision 13:d0d1da1fae4c:
/* * mbed Headder file for Hardware Monitor * * Copyright (c) 2014,'15 Kenji Arai / JH1PJL * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: June 1st, 2014 * Revised: May 16th, 2015 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // Object ---------------------------------------------------------------------------------------- extern Serial pc; // Definition ------------------------------------------------------------------------------------ #define BAUD_RATE 9600 #define BAUD(x) pc.baud(x) #define GETC(x) pc.getc(x) #define PUTC(x) pc.putc(x) #define PRINTF(...) pc.printf(__VA_ARGS__) #define READABLE(x) pc.readable(x) // Range check status #define ERR_NOTHING 0 #define ERR_MODIFY_SIZ 1 #define ERR_OUT_OF_RANGE 2 // Reg. Size #define SIZE8 8 #define SIZE16 16 #define SIZE32 32 #define SIZE_FULL 32 #define SIZE_X 32 // RAM ------------------------------------------------------------------------------------------- extern char linebuf[]; extern int buf_size; #if USE_MEM typedef struct { int32_t mstr; int32_t msiz; int32_t mtmp; int32_t mold; uint8_t mflg; uint8_t mbhw; } MEMO; static MEMO mem; #endif // Function prototypes --------------------------------------------------------------------------- extern void put_rn ( void ); extern void put_r ( void ); extern void put_lin ( void ); extern void put_spc( uint8_t n); extern void get_line (char *buff, int len); extern int xatoi (char **str, int32_t *res);