├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── splint ├── uncrustify └── uncrustify.cfg /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | 54 | # Emacs backups files 55 | *~ 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Joachim Naulet 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | CHECKS := c28x cm0+ e200z4 e200z7 2 | # e200z4-smp e200z7-smp 3 | SPLINTFLAGS := -I. -DCONFIG_CHECK_STACK_INTEGRITY -checks -exportlocal 4 | 5 | all: $(CHECKS) 6 | 7 | c28x: ARCH := arch/c2000/c28x 8 | c28x: SPLINTFLAGS += -I$(ARCH) -I$(ARCH)/samples 9 | c28x: 10 | splint $(SPLINTFLAGS) picoRTOS.c $(ARCH)/picoRTOS_port.c 11 | 12 | cm0+: ARCH := arch/arm/cm0+ 13 | cm0+: SPLINTFLAGS += -I$(ARCH) -I$(ARCH)/samples 14 | cm0+: 15 | splint $(SPLINTFLAGS) picoRTOS.c $(ARCH)/picoRTOS_port.c 16 | 17 | e200z4: ARCH := arch/ppc/e200 18 | e200z4: SPLINTFLAGS += -I$(ARCH) -I$(ARCH)/samples 19 | e200z4: 20 | splint $(SPLINTFLAGS) picoRTOS.c $(ARCH)/picoRTOS_port.c \ 21 | $(ARCH)/timer/timer-pit.c $(ARCH)/intc/intc-mpc574xx.c 22 | 23 | e200z7: ARCH := arch/ppc/e200 24 | e200z7: SPLINTFLAGS += -I$(ARCH) -I$(ARCH)/samples 25 | e200z7: 26 | splint $(SPLINTFLAGS) picoRTOS.c $(ARCH)/picoRTOS_port.c \ 27 | $(ARCH)/timer/timer-pit.c $(ARCH)/intc/intc-mpc5777x.c 28 | 29 | .phony: $(CHECKS) 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # picoRTOS 2 | 3 | Project has moved here: https://github.com/jnaulet/OpenPicoRTOS -------------------------------------------------------------------------------- /splint: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | COMMONFLAGS="-DCONFIG_CHECK_STACK_INTEGRITY -checks -exportlocal" 3 | 4 | # check c28x 5 | ARCH=arch/c2000/c28x 6 | SPLINTFLAGS="${COMMONFLAGS} -I. -I${ARCH} -I${ARCH}/samples" 7 | splint $SPLINTFLAGS picoRTOS.c $ARCH/picoRTOS_port.c 8 | 9 | # check cm0+ 10 | ARCH=arch/arm/cm0+ 11 | SPLINTFLAGS="${COMMONFLAGS} -I. -I${ARCH} -I${ARCH}/samples" 12 | splint $SPLINTFLAGS picoRTOS.c $ARCH/picoRTOS_port.c 13 | 14 | # check ppc 15 | ARCH=arch/ppc/e200 16 | SPLINTFLAGS="${COMMONFLAGS} -I. -I${ARCH} -I${ARCH}/samples" 17 | # ppc z4 18 | splint $SPLINTFLAGS picoRTOS.c $ARCH/picoRTOS_port.c $ARCH/timer/timer-pit.c $ARCH/intc/intc-mpc574xx.c 19 | # ppc z7 20 | splint $SPLINTFLAGS picoRTOS.c $ARCH/picoRTOS_port.c $ARCH/timer/timer-pit.c $ARCH/intc/intc-mpc5777x.c 21 | # ppc z4 SMP 22 | splint $SPLINTFLAGS picoRTOS-SMP.c $ARCH/picoRTOS_port.c $ARCH/timer/timer-pit.c $ARCH/intc/intc-mpc574xx.c $ARCH/core/core-mcme.c 23 | # ppc z7 SMP 24 | splint $SPLINTFLAGS picoRTOS-SMP.c $ARCH/picoRTOS_port.c $ARCH/timer/timer-pit.c $ARCH/intc/intc-mpc5777x.c $ARCH/core/core-siu.c 25 | -------------------------------------------------------------------------------- /uncrustify: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find . -name "*.[ch]" -exec uncrustify -c uncrustify.cfg --no-backup {} + 3 | -------------------------------------------------------------------------------- /uncrustify.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # uncrustify config file for the linux kernel 3 | # 4 | 5 | indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs 6 | input_tab_size = 8 # original tab size 7 | output_tab_size = 4 # new tab size 8 | indent_columns = output_tab_size 9 | 10 | indent_label = 1 # pos: absolute col, neg: relative column 11 | 12 | 13 | # 14 | # inter-symbol newlines 15 | # 16 | 17 | nl_enum_brace = remove # "enum {" vs "enum \n {" 18 | nl_union_brace = remove # "union {" vs "union \n {" 19 | nl_struct_brace = remove # "struct {" vs "struct \n {" 20 | nl_do_brace = remove # "do {" vs "do \n {" 21 | nl_if_brace = remove # "if () {" vs "if () \n {" 22 | nl_for_brace = remove # "for () {" vs "for () \n {" 23 | nl_else_brace = remove # "else {" vs "else \n {" 24 | nl_while_brace = remove # "while () {" vs "while () \n {" 25 | nl_switch_brace = remove # "switch () {" vs "switch () \n {" 26 | nl_brace_while = remove # "} while" vs "} \n while" - cuddle while 27 | nl_brace_else = remove # "} else" vs "} \n else" - cuddle else 28 | nl_func_var_def_blk = 1 29 | nl_fcall_brace = remove # "list_for_each() {" vs "list_for_each()\n{" 30 | nl_fdef_brace = add # "int foo() {" vs "int foo()\n{" 31 | # nl_after_return = TRUE; 32 | # nl_before_case = 1 33 | 34 | 35 | # 36 | # Source code modifications 37 | # 38 | 39 | mod_paren_on_return = remove # "return 1;" vs "return (1);" 40 | mod_full_brace_if = remove # "if (a) a--;" vs "if (a) { a--; }" 41 | mod_full_brace_for = remove # "for () a--;" vs "for () { a--; }" 42 | mod_full_brace_do = remove # "do a--; while ();" vs "do { a--; } while ();" 43 | mod_full_brace_while = remove # "while (a) a--;" vs "while (a) { a--; }" 44 | mod_full_brace_nl = 3 # don't remove if more than 3 newlines 45 | 46 | 47 | # 48 | # inter-character spacing options 49 | # 50 | 51 | # sp_return_paren = force # "return (1);" vs "return(1);" 52 | sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)" 53 | sp_before_sparen = force # "if (" vs "if(" 54 | sp_after_sparen = force # "if () {" vs "if (){" 55 | sp_after_cast = remove # "(int) a" vs "(int)a" 56 | sp_inside_braces = add # "{ 1 }" vs "{1}" 57 | sp_inside_braces_struct = add # "{ 1 }" vs "{1}" 58 | sp_inside_braces_enum = add # "{ 1 }" vs "{1}" 59 | sp_assign = add 60 | sp_arith = add 61 | sp_bool = add 62 | sp_compare = add 63 | sp_assign = add 64 | sp_after_comma = add 65 | sp_func_def_paren = remove # "int foo (){" vs "int foo(){" 66 | sp_func_call_paren = remove # "foo (" vs "foo(" 67 | sp_func_proto_paren = remove # "int foo ();" vs "int foo();" 68 | 69 | 70 | # 71 | # Aligning stuff 72 | # 73 | 74 | align_with_tabs = TRUE # use tabs to align 75 | align_on_tabstop = TRUE # align on tabstops 76 | # align_keep_tabs = true 77 | align_enum_equ_span = 4 # '=' in enum definition 78 | # align_nl_cont = TRUE 79 | # align_var_def_span = 2 80 | # align_var_def_inline = TRUE 81 | # align_var_def_star = FALSE 82 | # align_var_def_colon = TRUE 83 | # align_assign_span = 1 84 | align_struct_init_span = 3 # align stuff in a structure init '= { }' 85 | align_right_cmt_span = 3 86 | # align_pp_define_span = 8; 87 | # align_pp_define_gap = 4; 88 | 89 | # cmt_star_cont = FALSE 90 | 91 | # indent_brace = 0 92 | 93 | --------------------------------------------------------------------------------