Skip to content

Commit

Permalink
Merge pull request #145 from RICCIARDI-Adrien/rename_cortex_to_cortex_m
Browse files Browse the repository at this point in the history
Renamed the 'cortex' machine and examples into 'cortex-m' for more coherency.
  • Loading branch information
RICCIARDI-Adrien authored Oct 26, 2023
2 parents cfda787 + c1ab08a commit bf78dea
Show file tree
Hide file tree
Showing 3,316 changed files with 150 additions and 150 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
42 changes: 21 additions & 21 deletions .github/workflows/build-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ jobs:
path: ${{ github.workspace }}
key: ${{ env.CACHE_KEY }}
- name: Generate the code
run: ${{ env.GOIL }} --target=cortex/armv6m/samd21/ArduinoM0 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex/armv6m/samd21/ArduinoM0/${{ matrix.example_name }}
run: ${{ env.GOIL }} --target=cortex-m/armv6m/samd21/ArduinoM0 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex-m/armv6m/samd21/ArduinoM0/${{ matrix.example_name }}
- name: Build the code
run: ./make.py
working-directory: examples/cortex/armv6m/samd21/ArduinoM0/${{ matrix.example_name }}
working-directory: examples/cortex-m/armv6m/samd21/ArduinoM0/${{ matrix.example_name }}

cortex-m-xplained-pro-examples:
name: Build Cortex-M Xplained Pro examples
Expand All @@ -160,11 +160,11 @@ jobs:
path: ${{ github.workspace }}
key: ${{ env.CACHE_KEY }}
- name: Generate the code
run: ${{ env.GOIL }} --target=cortex/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex/armv6m/samd21/XPlainedPro/${{ matrix.example_name }}
run: ${{ env.GOIL }} --target=cortex-m/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex-m/armv6m/samd21/XPlainedPro/${{ matrix.example_name }}
- name: Build the code
run: ./make.py
working-directory: examples/cortex/armv6m/samd21/XPlainedPro/${{ matrix.example_name }}
working-directory: examples/cortex-m/armv6m/samd21/XPlainedPro/${{ matrix.example_name }}

cortex-m-arduino-due-examples:
name: Build Cortex-M Arduino Due examples
Expand All @@ -184,11 +184,11 @@ jobs:
path: ${{ github.workspace }}
key: ${{ env.CACHE_KEY }}
- name: Generate the code
run: ${{ env.GOIL }} --target=cortex/armv7m/atsam3x8e/arduino_due --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex/armv7m/atsam3x8e/arduino_due/${{ matrix.example_name }}
run: ${{ env.GOIL }} --target=cortex-m/armv7m/atsam3x8e/arduino_due --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex-m/armv7m/atsam3x8e/arduino_due/${{ matrix.example_name }}
- name: Build the code
run: ./make.py
working-directory: examples/cortex/armv7m/atsam3x8e/arduino_due/${{ matrix.example_name }}
working-directory: examples/cortex-m/armv7m/atsam3x8e/arduino_due/${{ matrix.example_name }}

cortex-m-smart-fusion-2-examples:
name: Build Cortex-M SmartFusion2 examples
Expand All @@ -209,11 +209,11 @@ jobs:
path: ${{ github.workspace }}
key: ${{ env.CACHE_KEY }}
- name: Generate the code
run: ${{ env.GOIL }} --target=cortex/armv7m/SmartFusion2 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex/armv7m/SmartFusion2/starterKit/${{ matrix.example_name }}
run: ${{ env.GOIL }} --target=cortex-m/armv7m/SmartFusion2 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex-m/armv7m/SmartFusion2/starterKit/${{ matrix.example_name }}
- name: Build the code
run: ./make.py
working-directory: examples/cortex/armv7m/SmartFusion2/starterKit/${{ matrix.example_name }}
working-directory: examples/cortex-m/armv7m/SmartFusion2/starterKit/${{ matrix.example_name }}

cortex-m-smart-nucleo-f303-examples:
name: Build Cortex-M Nucleo-F303 examples
Expand All @@ -234,11 +234,11 @@ jobs:
path: ${{ github.workspace }}
key: ${{ env.CACHE_KEY }}
- name: Generate the code
run: ${{ env.GOIL }} --target=cortex/armv7em/stm32f303 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex/armv7em/stm32f303/Nucleo-32/${{ matrix.example_name }}
run: ${{ env.GOIL }} --target=cortex-m/armv7em/stm32f303 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex-m/armv7em/stm32f303/Nucleo-32/${{ matrix.example_name }}
- name: Build the code
run: ./make.py
working-directory: examples/cortex/armv7em/stm32f303/Nucleo-32/${{ matrix.example_name }}
working-directory: examples/cortex-m/armv7em/stm32f303/Nucleo-32/${{ matrix.example_name }}

cortex-m-smart-nucleo-l432-examples:
name: Build Cortex-M Nucleo-F432 examples
Expand All @@ -259,11 +259,11 @@ jobs:
path: ${{ github.workspace }}
key: ${{ env.CACHE_KEY }}
- name: Generate the code
run: ${{ env.GOIL }} --target=cortex/armv7em/stm32l432 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex/armv7em/stm32l432/Nucleo-32/${{ matrix.example_name }}
run: ${{ env.GOIL }} --target=cortex-m/armv7em/stm32l432 --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex-m/armv7em/stm32l432/Nucleo-32/${{ matrix.example_name }}
- name: Build the code
run: ./make.py
working-directory: examples/cortex/armv7em/stm32l432/Nucleo-32/${{ matrix.example_name }}
working-directory: examples/cortex-m/armv7em/stm32l432/Nucleo-32/${{ matrix.example_name }}

cortex-m-smart-stm32f4discovery-examples:
name: Build Cortex-M STM32F4DISCOVERY examples
Expand All @@ -284,8 +284,8 @@ jobs:
path: ${{ github.workspace }}
key: ${{ env.CACHE_KEY }}
- name: Generate the code
run: ${{ env.GOIL }} --target=cortex/armv7em/stm32f407/stm32f4discovery --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex/armv7em/stm32f407/stm32f4discovery/${{ matrix.example_name }}
run: ${{ env.GOIL }} --target=cortex-m/armv7em/stm32f407/stm32f4discovery --templates=../../../../../../goil/templates/ ${{ matrix.example_name }}.oil
working-directory: examples/cortex-m/armv7em/stm32f407/stm32f4discovery/${{ matrix.example_name }}
- name: Build the code
run: ./make.py
working-directory: examples/cortex/armv7em/stm32f407/stm32f4discovery/${{ matrix.example_name }}
working-directory: examples/cortex-m/armv7em/stm32f407/stm32f4discovery/${{ matrix.example_name }}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,28 @@ Trampoline runs on the following platforms :

Some examples are available (check examples):

* Cortex M4 with µC stm32f407: `cortex/armv7em/stm32f407/stf32f4discovery`
* Cortex M4 with µC stm32f407: `cortex-m/armv7em/stm32f407/stf32f4discovery`
* **blink**. Blinks a LED using an alarm and a task.
* **readButton**. The example polls the button to start an alarm that activates a task to blink a LED
* **readButton_isr**. Same but the button triggers an ISR.
* **alarms**. It is the same example than readButton_isr but we test the return value of SetRelAlarm for return parameters when in kernel (system call) mode.
* **timer**. ISR2 trigered by timer TIM2.
* Cortex M4 with MCU stm32f303K8: `cortex/armv7em/stm32f303/Nucleo-32`. There are few differences from the `stm32f407` target, and examples should be easily imported.
* Cortex M4 with MCU stm32f303K8: `cortex-m/armv7em/stm32f303/Nucleo-32`. There are few differences from the `stm32f407` target, and examples should be easily imported.
* **blink**. Blinks a LED using an alarm and a task.
* Cortex M4 with MCU stm32L432KC: `cortex/armv7em/stm32l432/Nucleo-32`.
* Cortex M4 with MCU stm32L432KC: `cortex-m/armv7em/stm32l432/Nucleo-32`.
* **blink**. Blinks a LED using an alarm and a task.
* **readButton**. The example polls the button to start an alarm that activates a task to blink a LED
* **readButton_isr**. Same but the button triggers an ISR.
* Cortex M4 with µC mk20dx256 : `cortex/armv7em/mk20dx256/teensy31`
* Cortex M4 with µC mk20dx256 : `cortex-m/armv7em/mk20dx256/teensy31`
* **blink**. Blinks the Teensy 3.1 LED using an alarm and a task.
* **startStopBlink**. The example polls a button connected to pin 8 to start an alarm that activates a task to blink a LED.
* **liquidCrystal**. startStopBlink extended. In addition the periodic task prints a value on a LCD.
* **isr2onPIT**. Use the PIT channel 0 to trigger an ISR2.
* **isr1onFTM**. Use the FTM0 to trigger an ISR1 and generate a variable width pulse.
* Cortex M3 with µC SmartFusion2: `cortex/armv7m/SmartFusion2`.
* Cortex M3 with µC SmartFusion2: `cortex-m/armv7m/SmartFusion2`.
* **blink**. a simple periodic example which toggles the two green leds (DS3, DS4) of the board
* **fpgaInterrupt** an interrupt from the FPGA fabriq toggles the green led DS4 of the board (and a periodic task blinks another Led).
* Cortex M0+ with µC samd21: `cortex/armv6m/samd21/XPlainedPro`.
* Cortex M0+ with µC samd21: `cortex-m/armv6m/samd21/XPlainedPro`.
* **blink**. Blinks a LED using an alarm and a task.
* **readButton**. The example polls the button to start an alarm that activates a task to blink a LED
* **readButton_isr**. Same but the button triggers an ISR.
Expand Down
16 changes: 8 additions & 8 deletions documentation/manual/building.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ \section{Build system}

\subsection{Python build}
The python system generates 2 files \file{build.py} and \file{make.py}. The script will take into account all the dependancies. For example, modifying an object in the oil file will result in calling goil (and generating again the \file{build.py} file again), before doing the rest of the build step. As a result, \goil\ should be called only once (bootstrap), and then \com{./make.py} will do all the stuff.
A basic run is (from \file{examples/cortex/armv7em/stm32f303/Nucleo-32/blink})
A basic run is (from \file{examples/cortex-m/armv7em/stm32f303/Nucleo-32/blink})
\begin{verbatim}
% goil --target=cortex/armv7em/stm32f303 --templates=../../../../../../goil/templates/ blink.oil
% goil --target=cortex-m/armv7em/stm32f303 --templates=../../../../../../goil/templates/ blink.oil
Created 'blink/tpl_dispatch_table.c'.
Created 'blink/tpl_invoque.S'.
Created 'blink/tpl_os.h'.
Expand All @@ -102,7 +102,7 @@ \subsection{Python build}
Created 'blink/tpl_cortex_definitions.h'.
Created 'blink/stm_structure.c'.
executing plugin gdb_commands.goilTemplate
Created '/home/mik/prog/trampoline/examples/cortex/armv7em/stm32f303/Nucleo-32/blink/build/blink.oil.dep'.
Created '/home/mik/prog/trampoline/examples/cortex-m/armv7em/stm32f303/Nucleo-32/blink/build/blink.oil.dep'.
No warning, no error.
\end{verbatim}
Then, we call the python script \com{./make.py}:
Expand All @@ -113,7 +113,7 @@ \subsection{Python build}
[ 3%] Compiling ../../../../../../os/tpl_os_kernel.c
[ 6%] Compiling ../../../../../../os/tpl_os_timeobj_kernel.c
[ 96%] Compiling ../../../../../../machines/cortex/armv7em/stm32f303/tpl_trace.c
[ 96%] Compiling ../../../../../../machines/cortex-m/armv7em/stm32f303/tpl_trace.c
[100%] Linking blink_exe
Generating binary blink_exe.bin from blink_exe
\end{verbatim}
Expand All @@ -130,7 +130,7 @@ \subsection{CMake build system}

The bootstrap using \goil\ is the same as in PYTHON:
\begin{verbatim}
% goil --target=cortex/armv7em/stm32f303 --templates=../../../../../../goil/templates/ blink.oil
% goil --target=cortex-m/armv7em/stm32f303 --templates=../../../../../../goil/templates/ blink.oil
Created 'blink/tpl_dispatch_table.c'.
Created 'blink/tpl_invoque.S'.
Created 'blink/tpl_os.h'.
Expand All @@ -155,7 +155,7 @@ \subsection{CMake build system}
Created 'blink/tpl_cortex_definitions.h'.
Created 'blink/stm_structure.c'.
executing plugin gdb_commands.goilTemplate
Created '/home/mik/prog/trampoline/examples/cortex/armv7em/stm32f303/Nucleo-32/blink/build/blink.oil.dep'.
Created '/home/mik/prog/trampoline/examples/cortex-m/armv7em/stm32f303/Nucleo-32/blink/build/blink.oil.dep'.
No warning, no error.
\end{verbatim}

Expand All @@ -182,7 +182,7 @@ \subsection{CMake build system}
-- Found assembler: /opt/gcc-arm/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mik/prog/trampoline/examples/cortex/armv7em/stm32f303/Nucleo-32/blink/build
-- Build files have been written to: /home/mik/prog/trampoline/examples/cortex-m/armv7em/stm32f303/Nucleo-32/blink/build
-> % make
Scanning dependencies of target blink_exe
[ 3%] Building C object CMakeFiles/blink_exe.dir/blink.c.obj
Expand Down Expand Up @@ -211,7 +211,7 @@ \section{Goil related features}

\subsection{Compilation flags}

Some flags may be defined globally for a specific target. It can be retrieved in the \goil\ templates, in the \file{config/} subfolders. The file is named \file{buildOptions.oil}. For instance, on ARM Cortex-M4 (armv7em ISA), the path is \file{goil/templates/config/cortex/armv7em/buildOptions.oil}.
Some flags may be defined globally for a specific target. It can be retrieved in the \goil\ templates, in the \file{config/} subfolders. The file is named \file{buildOptions.oil}. For instance, on ARM Cortex-M4 (armv7em ISA), the path is \file{goil/templates/config/cortex-m/armv7em/buildOptions.oil}.
begin
Some other flags can be added directly in the main \file{config.oil} file in the templates.

Expand Down
2 changes: 1 addition & 1 deletion documentation/manual/porting.tex
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ \subsection{Interrupt management}

So at step \ref{item:caltheservice}, the interrupt handler uses the interrupt source number as an index in the \var{tpl_it_table}, get the corresponding interrupt handling function pointer and calls the function.

If interrupts are fully vectorized, i.e. each interrupt source has its own interrupt vector, goil should generate the code for each vector. See how it is done in \file{cortex/armv7em} port.
If interrupts are fully vectorized, i.e. each interrupt source has its own interrupt vector, goil should generate the code for each vector. See how it is done in \file{cortex-m/armv7em} port.

\section{Target specific structures}

Expand Down
4 changes: 2 additions & 2 deletions documentation/manual/traces.tex
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ \subsubsection{MSP430 target}
In all cases, a trace event should take as low room as possible, and is stored in binary format (see section \ref{sec:traceBinFormat}).

\subsubsection{STM32 target}
On STM32 (Nucleo STM32F303 and STM32L432), the Serial target is implemented. There is a full example in \texttt{examples/cortex/armv7em/stm32f303/Nucleo-32/trace}
On STM32 (Nucleo STM32F303 and STM32L432), the Serial target is implemented. There is a full example in \texttt{examples/cortex-m/armv7em/stm32f303/Nucleo-32/trace}

\begin{lstlisting}[language=OIL]
TRACE = TRUE {
Expand Down Expand Up @@ -263,7 +263,7 @@ \subsection{Binary format}

\subsection{How to port \texttt{trace} to another target}

The \texttt{tpl\_trace.c} is target specific. It should be defined in the \lstinline{machine} hierarchy. A good starting point is the stm32's version\footnote{file \file{machines/cortex/armv7em/stm32f303/tpl_trace.c}}, with a SERIAL implementation. In the \texttt{avr/arduino} version, a C++ example is provided.
The \texttt{tpl\_trace.c} is target specific. It should be defined in the \lstinline{machine} hierarchy. A good starting point is the stm32's version\footnote{file \file{machines/cortex-m/armv7em/stm32f303/tpl_trace.c}}, with a SERIAL implementation. In the \texttt{avr/arduino} version, a C++ example is provided.

Then, the goil templates should be updated. This is done in 2 steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ The system is based scheduled with a 1ms SysTick `SystemCounter`.
Configure the application with:

```
goil --target=cortex/armv7em/stm32f407/stm32f4discovery --templates=../../../../../../goil/templates/ readbutton_isr.oil
goil --target=cortex-m/armv7em/stm32f407/stm32f4discovery --templates=../../../../../../goil/templates/ readbutton_isr.oil
```
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The option `CPU->OS->BUILD->SYSTEM` should be set to `PYTHON`.
Configure the application with:

```
goil --target=cortex/armv6m/samd21/ArduinoM0 --templates=../../../../../../goil/templates blink.oil
goil --target=cortex-m/armv6m/samd21/ArduinoM0 --templates=../../../../../../goil/templates blink.oil
```

The `goil` compiler generates the `make.py` [python build script](https://github.com/TrampolineRTOS/trampoline/wiki/Application-Build-system). Then run the script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The option `CPU->OS->BUILD->SYSTEM` should be set to `PYTHON`.
Configure the application with:

```
goil --target=cortex/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ blink.oil
goil --target=cortex-m/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ blink.oil
```

The `goil` compiler generates the `make.py` [python build script](https://github.com/TrampolineRTOS/trampoline/wiki/Application-Build-system). Then run the script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You should have:
Configure the application with:

```
goil --target=cortex/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ readbutton.oil
goil --target=cortex-m/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ readbutton.oil
```

The `goil` compiler generates the `make.py` [python build script](https://github.com/TrampolineRTOS/trampoline/wiki/Application-Build-system). Then run the script:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "tpl_os.h"
//the READY tasks state definition conflicts with registers definition (in sam.h)
#undef READY
#include "pinAccess.h" //provided in machines/cortex/armv6m/samd21/utils
#include "pinAccess.h" //provided in machines/cortex-m/armv6m/samd21/utils

#define APP_Task_read_button_START_SEC_CODE
#include "tpl_memmap.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You should have:
Configure the application with:

```
goil --target=cortex/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ readbutton_isr.oil
goil --target=cortex-m/armv6m/samd21/XPlainedPro --templates=../../../../../../goil/templates/ readbutton_isr.oil
```

The `goil` compiler generates the `make.py` [python build script](https://github.com/TrampolineRTOS/trampoline/wiki/Application-Build-system). Then run the script:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "tpl_os.h"
//the READY tasks state definition conflicts with registers definition (in sam.h)
#undef READY
#include "pinAccess.h" //provided in machines/cortex/armv6m/samd21/utils
#include "eic.h" //provided in machines/cortex/armv6m/samd21/utils
#include "pinMux.h" //provided in machines/cortex/armv6m/samd21/utils
#include "pinAccess.h" //provided in machines/cortex-m/armv6m/samd21/utils
#include "eic.h" //provided in machines/cortex-m/armv6m/samd21/utils
#include "pinMux.h" //provided in machines/cortex-m/armv6m/samd21/utils



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Look at the CFLAGS in the blink.oil file. The tools are arm-none-eabi-xxx and th
Configure the application with:

```
goil --target=cortex/armv7em/mk20dx256/teensy31 --templates=../../../../../../goil/templates blink.oil
goil --target=cortex-m/armv7em/mk20dx256/teensy31 --templates=../../../../../../goil/templates blink.oil
```

Then compile the application:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The system is based scheduled with a 1ms SysTick "SystemCounter".
Configure the application with:

```
goil --target=cortex/armv7em/mk20dx256/teensy31 --templates=../../../../../../goil/templates isr1onFTM.oil
goil --target=cortex-m/armv7em/mk20dx256/teensy31 --templates=../../../../../../goil/templates isr1onFTM.oil
```

Then compile the application:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The system is based scheduled with a 1ms SysTick "SystemCounter".
Configure the application with:

```
goil --target=cortex/armv7em/mk20dx256/teensy31 --templates=../../../../../../goil/templates isr2onPIT.oil
goil --target=cortex-m/armv7em/mk20dx256/teensy31 --templates=../../../../../../goil/templates isr2onPIT.oil
```

Then compile the application:
Expand Down
Loading

0 comments on commit bf78dea

Please sign in to comment.