Skip to content

Commit

Permalink
Merge branch 'master' into stm32h743
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikaël BRIDAY committed May 28, 2024
2 parents f5dab17 + 1ff0f13 commit c1b5667
Show file tree
Hide file tree
Showing 119 changed files with 98 additions and 9,437 deletions.
48 changes: 45 additions & 3 deletions examples/cortex-a-r/armv8/spider/can_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ Between the DB-9 pin 7 and pin 3 we soldered a 60 ohms resistors, we also added
## Software setup

The Kvaser CanKing CAN bus configuration is as follow :
* Bus speed : 125 Kbit/s.
* Sample point : 75% (Tseg1 = 11, TSeg2 = 4).
* SWJ (Synchronization Jump Width) : 4.
* CAN Mode : CAN FD
* Both Arbitration Phase and Data Phase parameters set to :
* Bus speed : 1000 Kbit/s, 80%.
* SJW : 8
* Bit timing : Tseg1=31, Tseg2=8.

No configuration is needed on the CAN demo application side.

Expand All @@ -32,9 +34,49 @@ goil --target=cortex-a-r/armv8/spider --templates=../../../../../goil/templates/

## Running

### Using Kvaser CanKing

Before starting the CAN demo application, connect the hardware setup and configure the Kvaser CanKing application as described in the above paragraphs.
Then, click the CanKing `Go On Bus` button.
Now, you can run the CAN demo application.

The CAN demo application starts by sending a CAN frame with the CAN ID `0x123` and the string payload `Ready!`.
After that, it waits for a CAN frame to be received. When a frame is received, it increments the CAN ID and all the payload bytes, then it sends the frame back.

### Using canfdtest on Linux

For this test we used `Ubuntu 23.10` as it is the first Ubuntu version containing a recent enough version of the `can-utils` package (the minimal required version of the `can-utils` package is `v2023.03`).

* Install the required package :
```
sudo apt install can-utils
```
Note : it is also possible to build the `can-utils` package from sources to run it on older Linux versions (see [https://github.com/linux-can/can-utils/releases/tag/v2023.03](https://github.com/linux-can/can-utils/releases/tag/v2023.03)).
* Start the CAN demo application on the board.
* Then, execute the following commands on the Linux PC :
```
# Configure the CAN interface for CAN-FD operations without bit rate switch
sudo ip link set can0 type can bitrate 1000000 dbitrate 1000000 fd on
sudo ip link set up can0
# Run the test (the PC generates the frames and the board sends the answers)
# Generate CAN-FD frames without bit rate switch
canfdtest -d -g -v can0
```
* When frames are correctly transmitted and received, the output of the program looks like :
```
baylibre@baylibre:~$ canfdtest -d -g -v can0
interface = can0, family = 29, type = 3, proto = 1
.................................................................
```
* On another terminal on the PC, you can display the CAN bus load, showing that frames are being transmitted :
Run the command : `canbusload -b can0@1000000`.
The output of the program looks like :
```
baylibre@baylibre:~$ canbusload -b can0@1000000
can0@1000000 963 131931 61632 0 13% |XX..................|
can0@1000000 1061 145357 67904 0 14% |XX..................|
can0@1000000 1012 138644 64768 0 13% |XX..................|
```
40 changes: 40 additions & 0 deletions examples/rh850/can_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,49 @@ If you want to generate a `.srec` file to directly flash on the board, look at t

## Running

### Using Kvaser CanKing

Before starting the CAN demo application, connect the hardware setup and configure the Kvaser CanKing application as described in the above paragraphs.
Then, click the CanKing `Go On Bus` button.
Now, you can run the CAN demo application.

The CAN demo application starts by sending a CAN frame with the CAN ID `0x123` and the string payload `Ready!`.
After that, it waits for a CAN frame to be received. When a frame is received, it increments the CAN ID and all the payload bytes, then it sends the frame back.

### Using canfdtest on Linux

For this test we used `Ubuntu 23.10` as it is the first Ubuntu version containing a recent enough version of the `can-utils` package (the minimal required version of the `can-utils` package is `v2023.03`).

* Install the required package :
```
sudo apt install can-utils
```
Note : it is also possible to build the `can-utils` package from sources to run it on older Linux versions (see [https://github.com/linux-can/can-utils/releases/tag/v2023.03](https://github.com/linux-can/can-utils/releases/tag/v2023.03)).
* Start the CAN demo application on the board.
* Then, execute the following commands on the Linux PC :
```
# Configure the CAN interface for CAN-FD operations without bit rate switch
sudo ip link set can0 type can bitrate 1000000 dbitrate 1000000 fd on
sudo ip link set up can0
# Run the test (the PC generates the frames and the board sends the answers)
# Generate CAN-FD frames without bit rate switch
canfdtest -d -g -v can0
```
* When frames are correctly transmitted and received, the output of the program looks like :
```
baylibre@baylibre:~$ canfdtest -d -g -v can0
interface = can0, family = 29, type = 3, proto = 1
.................................................................
```
* On another terminal on the PC, you can display the CAN bus load, showing that frames are being transmitted :
Run the command : `canbusload -b can0@1000000`.
The output of the program looks like :
```
baylibre@baylibre:~$ canbusload -b can0@1000000
can0@1000000 963 131931 61632 0 13% |XX..................|
can0@1000000 1061 145357 67904 0 14% |XX..................|
can0@1000000 1012 138644 64768 0 13% |XX..................|
```
9 changes: 9 additions & 0 deletions examples/rh850/can_demo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

set -e

TRAMPOLINE_BASE_PATH="$(realpath ../../..)"
PROGRAM_NAME=can_demo
FLASH_TOOL_PROGRAM_NAME=App_CDD_ICCOM_S4_Sample_G4MH

echo "*** Run Goil ***"
mkdir -p _build
Expand All @@ -14,3 +16,10 @@ cmake -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE=../${PROGRAM_NAME}/compiler.cm

echo "*** Run Make ***"
make

# Create the S-Record file to provide to Flash_Tool to set the G4MH core default firmware on board boot
# The flashing procedure expects 32-bit addresses, so use S3 records instead of S1
objcopy -O srec --srec-forceS3 ${PROGRAM_NAME}_exe.abs ${FLASH_TOOL_PROGRAM_NAME}.s3
# Add a specific header
rlink "$(cygpath -w ${TRAMPOLINE_BASE_PATH}/machines/rh850/g4mh/G4MH_Head.srec)" ${FLASH_TOOL_PROGRAM_NAME}.s3 -FOrm=SType -OUtput=${FLASH_TOOL_PROGRAM_NAME}.srec
rm -f ${FLASH_TOOL_PROGRAM_NAME}.s3
5 changes: 3 additions & 2 deletions examples/rh850/memory_unlocker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -e

TRAMPOLINE_BASE_PATH="$(realpath ../../..)"
PROGRAM_NAME=memory_unlocker
FLASH_TOOL_PROGRAM_NAME=App_CDD_ICCOM_S4_Sample_G4MH

Expand All @@ -19,6 +20,6 @@ make
# Create the S-Record file to provide to Flash_Tool to set the G4MH core default firmware on board boot
# The flashing procedure expects 32-bit addresses, so use S3 records instead of S1
objcopy -O srec --srec-forceS3 ${PROGRAM_NAME}_exe.abs ${FLASH_TOOL_PROGRAM_NAME}.s3
# Add a specific header (it has been downloaded here : https://raw.githubusercontent.com/renesas-rcar/whitebox-sdk/v4.x/mcu/G4MH_Head.srec)
rlink ../G4MH_Head.srec ${FLASH_TOOL_PROGRAM_NAME}.s3 -FOrm=SType -OUtput=${FLASH_TOOL_PROGRAM_NAME}.srec
# Add a specific header
rlink "$(cygpath -w ${TRAMPOLINE_BASE_PATH}/machines/rh850/g4mh/G4MH_Head.srec)" ${FLASH_TOOL_PROGRAM_NAME}.s3 -FOrm=SType -OUtput=${FLASH_TOOL_PROGRAM_NAME}.srec
rm -f ${FLASH_TOOL_PROGRAM_NAME}.s3
1 change: 0 additions & 1 deletion goil/build/.gitignore

This file was deleted.

Empty file modified goil/build/libpm/bdd/C_BDD-and-operation.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/bdd/C_BDD-find-or-add.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/bdd/C_BDD-node.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/bdd/C_BDD-single-operand-ops.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/bdd/C_BDD.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/bdd/C_BDD.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/cocoa_utilities/main.m
100755 → 100644
Empty file.
Empty file.
Empty file modified goil/build/libpm/command_line_interface/F_Analyze_CLI_Options.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/command_line_interface/F_mainForLIBPM.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/command_line_interface/F_mainForLIBPM.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/files/C_BinaryFileWrite.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/files/C_BinaryFileWrite.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/files/C_HTML_FileWrite.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/files/C_HTML_FileWrite.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/files/C_TextFileWrite.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/files/C_TextFileWrite.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/AC_GALGAS_sortedlist.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_Compiler.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_Compiler.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_Lexique.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_Lexique.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_LocationInSource.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_LocationInSource.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_SourceTextInString.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_SourceTextInString.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_class_inspector.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_class_inspector.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_function_descriptor.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_function_descriptor.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_io.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_io.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_type_descriptor.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/C_galgas_type_descriptor.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_application.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_bigint.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_bool.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_char.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_data.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_double.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_function.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_location.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_sint.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_sint_36__34_.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_string.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_stringset.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_timer.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_type.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_uint.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/GALGAS_uint_36__34_.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cEnumerator_range.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cEnumerator_range.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cIndexingDictionary.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cIndexingDictionary.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cIssueDescriptor.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cIssueDescriptor.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cProductionNameDescriptor.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/cTemplateDelimiter.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/scanner_actions.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/galgas2/scanner_actions.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/streams/AC_OutputStream.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/streams/AC_OutputStream.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/streams/C_ConsoleOut.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/streams/C_ConsoleOut.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/streams/C_ErrorOut.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/streams/C_ErrorOut.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/time/C_DateTime.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/time/C_DateTime.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/time/C_Timer.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/time/C_Timer.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/C_PrologueEpilogue.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/C_PrologueEpilogue.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/F_DisplayException.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/F_DisplayException.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/F_GetPrime.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/F_GetPrime.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/MF_Assert.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/MF_Assert.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/MF_MemoryControl.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/MF_MemoryControl.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/M_SourceLocation.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/M_machine.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/TF_Swap.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/basic-allocation.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/basic-allocation.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/cpp-allocation.cpp
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/cpp-allocation.h
100755 → 100644
Empty file.
Empty file modified goil/build/libpm/utilities/switch-fallthrough.h
100755 → 100644
Empty file.
74 changes: 0 additions & 74 deletions goil/build/tex/arxml_grammar.document.tex

This file was deleted.

81 changes: 0 additions & 81 deletions goil/build/tex/arxml_grammar.tex

This file was deleted.

74 changes: 0 additions & 74 deletions goil/build/tex/arxmlmetaparser_grammar.document.tex

This file was deleted.

Loading

0 comments on commit c1b5667

Please sign in to comment.