Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to aiim #2

Merged
merged 66 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
d1d5534
Update Waf to v2.1.1
yashi Jul 13, 2024
f21c1aa
build-test: Add Ubuntu 24.04
yashi Jul 13, 2024
950172c
meson: Conditionally compile can_socketcan
yashi Aug 6, 2024
677c6d8
python: Conditional RTABLE-related functions
yashi Aug 6, 2024
55d4437
rdp_queue: Fix dequeuing from wrong queue
dimitrovand Aug 8, 2024
96addc6
csp_if_zmqhub: Remove value unused from csp_buffer_get()
moonlight83340 Aug 6, 2024
7fd630c
csp_if_tun: Remove packet->frame_length from csp_buffer_get()
moonlight83340 Aug 6, 2024
759c533
csp_rdp: csp_buffer_get() set unused value to 0
moonlight83340 Aug 6, 2024
3a38e51
pycsp: Remove size from csp_buffer_get()
moonlight83340 Aug 6, 2024
03d7e9f
python: example: csp_buffer_get() set unused value to 0
moonlight83340 Aug 8, 2024
408e727
csp_services: csp_buffer_get() set unused value to 0
moonlight83340 Aug 6, 2024
345d46c
example: csp_buffer_get() set unused value to 0
moonlight83340 Aug 8, 2024
b0364f0
zephyr: sample: main: csp_buffer_get() set unused value to 0
moonlight83340 Aug 6, 2024
4844943
csp_io: csp_transaction_persistent: unchecked size can lead to buffe…
moonlight83340 Aug 8, 2024
7dd9a5d
csp_services: csp_ping: unchecked size can lead to buffer overflow
moonlight83340 Aug 8, 2024
0bfb5da
rdp_queue: Move __csp_rdp_queue_flush before file global variables
yashi Aug 9, 2024
d44dc3f
github: workflow: Add ABI Compliance Check
moonlight83340 Aug 8, 2024
836c761
rdp_queue: Consolidate duplicate functionality into single functions
dimitrovand Aug 10, 2024
213790c
csp_route: Fix return value comparison
dimitrovand Aug 14, 2024
7ce0434
github: workflow: Add gitlint
yashi Aug 15, 2024
5007b08
github: template: Add Q&A and bug report template
yashi Aug 13, 2024
26491b5
github: workflow: Add build and test python binding
moonlight83340 Aug 12, 2024
9f1c2cc
csp_route: Use CSP_ERR_NONE instead of 0
moonlight83340 Aug 15, 2024
f1675ab
csp_port: Fix return value of csp_bind_callback()
dimitrovand Aug 16, 2024
f4b0acc
Fix typos
dimitrovand Aug 16, 2024
899b69f
github: workflow: python: Test against multiple Python versions
yashi Aug 16, 2024
c6bf923
github: workflow: python: Rename the workflow name
yashi Aug 16, 2024
3875252
csp_sfp: Replace __FUNCTION__ with __func__
yashi Aug 17, 2024
f6a934e
drivers: can_socketcan: Replace __FUNCTION__ with __func__
yashi Aug 17, 2024
bdbdf91
drivers: usart_linux: Replace __FUNCTION__ with __func__
yashi Aug 17, 2024
464bd3c
drivers: usart_zephyr: Replace __FUNCTION__ with __func__
yashi Aug 17, 2024
fe51dfc
contrib: usart_windows: Replace __FUNCTION__ with __func__
yashi Aug 17, 2024
264378d
macosx: csp_semaphore: Cast arguments for %p
yashi Aug 18, 2024
31b6384
interfaces: csp_if_eth_pbuf: Cast arguments for %p
yashi Aug 18, 2024
493c8d1
csp_hex_dump: Cast arguments for %p
yashi Aug 18, 2024
feaa269
csp_sfp: Cast arguments for %p
yashi Aug 18, 2024
63d341e
csp_conn: Cast arguments for %p
yashi Aug 18, 2024
1da891d
csp_rdp: Cast arguments for %p
yashi Aug 18, 2024
5c56df7
posix: csp_queue: Remove `return`
yashi Aug 18, 2024
fa30a83
github: workflow: Add Python 3.12
yashi Aug 18, 2024
b8a5a96
github: workflow: build-test-python: Remove unused option
yashi Aug 18, 2024
f6ac990
github: workflow: build-test: Remove unused option
yashi Aug 18, 2024
b192533
examples: buildall.py: Remove unused 'rest' argument
yashi Aug 18, 2024
07622aa
type safety: Make data types explicit in bit modifications
6arms1leg Aug 18, 2024
9d065c1
rdp_queue: Refactor csp_rdp_queue_get for clarity
yashi Aug 18, 2024
2957099
csp_queue: Added function comment to csp_queue_create_static
alexapostolu Aug 18, 2024
9ea5206
github: workflow: abi-checker: Use ubuntu-latest
yashi Aug 21, 2024
8ff44ee
github: workflow: abi-checker: Remove matrix.os
yashi Aug 21, 2024
6157a10
doc: Fix EOF newlines
yashi Aug 21, 2024
919fcdc
contrib: windows: README: Fix EOF newlines
yashi Aug 21, 2024
c7c09ff
contrib: windows: csp_system: Fix EOF newlines
yashi Aug 21, 2024
20bc154
contrib: drivers: can: Fix EOF newlines
yashi Aug 21, 2024
43b065b
contrib: hooks: csp_hook_asf4: Fix EOF newlines
yashi Aug 21, 2024
7f296d2
arch/CMakeLists.txt: Fix EOF newlines
yashi Aug 21, 2024
d9a9131
arch: meson: Fix EOF newlines
yashi Aug 21, 2024
109db00
interfaces: csp_if_eth_pbuf: Fix EOF newlines
yashi Aug 21, 2024
a31faec
csp_dedup.h: Fix EOF newlines
yashi Aug 21, 2024
29bf183
github: workflow: Check for EOF newline
yashi Aug 21, 2024
2dfaf8b
doc: Add contributing guide
yashi Aug 22, 2024
4e8d79c
Merge branch 'develop' of https://github.com/libcsp/libcsp into libcs…
Apaisal Aug 23, 2024
c2f83ad
Merge branch 'libcsp-develop' into develop
Apaisal Aug 23, 2024
50ef360
Support CAN XL payload length and DLC definitions according to ISO 11…
Apaisal Aug 23, 2024
e0b01d5
Remove unused variable
Apaisal Aug 23, 2024
8adf74b
Merge branch 'aiim' of github.com:emone/libcsp into develop
Apaisal Aug 24, 2024
1c2abdd
Avoid redefinition.
Apaisal Aug 24, 2024
1dba51d
Merge branch 'develop' of github.com:emone/libcsp into develop
Apaisal Aug 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/ISSUE_TEMPLATE/01_q_and_a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
name: Q & A
about: Ask for help
title: ''
labels: Q&A
---

## Description

<!--
Describe your question in detail. Explain what you're trying to
achieve and what specific part is causing trouble.
-->

## Steps to Reproduce

<!--
Provide a step-by-step guide on how to reproduce the issue. Include
any code snippets, commands, or configurations.
-->

1.
2.
3.

## Expected behavior

<!--
A clear and concise description of what you expected to happen.
-->

## Actual Behavior

<!--
Describe what actually happened. Include any error messages or
unexpected outputs.
-->

## Environment Details

Provide information about your environment, including:

- Build OS: (e.g., Ubuntu 24.04)
- Target OS: (e.g., Ubunut 24.04, FreeRTOS, Zephyr)
- libcsp commit hash:
- Meson version:
- CMake version:
- GNU Make version
- Ninja version:

## Logs or console output from the very beginning to the end

<!--
Do NOT add screen shorts. Make sure to copy & paste in plain text. Or,
use logging feature of your terminal software.
-->

## Additional Context

<!--
Add any other context, logs, or screenshots that might help in
understanding the issue.
-->

## Checklist

<!--
Please confirm by replacing `[ ]` with `[x]`.
-->

- [ ] I've searched in "Issues" for similar issues, both open and closed.
- [ ] I've used GitHub Flavored Markdown (GFM) to format my text.
- [ ] I've avoided using screenshots for console output or logs
- [ ] I've included all relevant details and steps to reproduce the issue.
- [ ] I've provided information about my environment.
- [ ] I've attached necessary logs or code snippet for minimal reproducible example.
78 changes: 78 additions & 0 deletions .github/ISSUE_TEMPLATE/02_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
name: Bug Report
about: Create a report to help us improve libcsp
title: ''
labels: Defect
---

## Description

<!--
Describe the bug in detail. Explain what the bug is and how it affects
the project.
-->

## Steps to Reproduce

<!--
Provide a step-by-step guide on how to reproduce the issue. Include
any code snippets, commands, or configurations.
-->

1.
2.
3.

## Expected behavior

<!--
A clear and concise description of what you expected to happen.
-->

## Actual Behavior:

<!--
Describe what actually happened. Include any error messages or
unexpected outputs.
-->

## Environment Details:

Provide information about your environment, including:

- Build OS: (e.g., Ubuntu 24.04)
- Target OS: (e.g., Ubunut 24.04, FreeRTOS, Zephyr)
- libcsp commit hash:
- Meson version:
- CMake version:
- GNU Make version
- Ninja version:

## Logs or console output from the very beginning to the end

<!--
Do NOT add screen shorts. Make sure to copy & paste in plain text. Or,
use logging feature of your terminal software.
-->

## Additional Context:

<!--

Add any other context, logs or code snippet for minimal reproducible
example that might help in understanding the issue.

-->

## Checklist

<!--
Please confirm by replacing `[ ]` with `[x]`.
-->

- [ ] I've searched in "Issues" for similar issues, both open and closed.
- [ ] I've used GitHub Flavored Markdown (GFM) to format my text.
- [ ] I've avoided using screenshots for console output or logs
- [ ] I've included all relevant details and steps to reproduce the issue.
- [ ] I've provided information about my environment.
- [ ] I've attached necessary logs or code snippet for minimal reproducible example.
58 changes: 58 additions & 0 deletions .github/workflows/abi-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: ABI Compliance Check
on: [pull_request]
jobs:
abi-check:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Setup packages on Linux
run: |
sudo apt-get update
sudo apt-get install libzmq3-dev libsocketcan-dev

- name: Setup build system packages on Linux
run: |
sudo apt-get install ninja-build cmake

- name: Setup ABI Compliance Checker
run: |
sudo apt-get install abi-compliance-checker abi-dumper

- name: Checkout merged-base
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Build and Dump ABI for `merged-base` version
run: |
cmake -GNinja -B build -DCMAKE_BUILD_TYPE=Debug -DCSP_USE_RTABLE=1 -DCMAKE_POSITION_INDEPENDENT_CODE=ON && ninja -C build
abi-dumper build/libcsp.so -lver "merged-base" -o ../tmp/libcsp-merged-base.dump

- name: Checkout Current PR
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Build and Dump ABI for Current PR
run: |
cmake -GNinja -B build -DCMAKE_BUILD_TYPE=Debug -DCSP_USE_RTABLE=1 -DCMAKE_POSITION_INDEPENDENT_CODE=ON && ninja -C build
abi-dumper build/libcsp.so -lver "PR" -o ../tmp/pr.dump

- name: Compare ABI
run: |
abi-compliance-checker -l libcsp -old ../tmp/libcsp-merged-base.dump -new ../tmp/pr.dump

- name: Check ABI Compatibility Result
if: failure()
run: echo "::warning::ABI compatibility issues detected. Please review the report."

- name: Upload ABI Report
if: always()
uses: actions/upload-artifact@v4
with:
name: abi-compliance-report-${{ github.run_id }}
path: compat_reports
if-no-files-found: warn
64 changes: 64 additions & 0 deletions .github/workflows/build-test-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Python Bindings
on: [push, pull_request]
jobs:
build-test-python:
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
os:
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
buildsystem:
- meson
- cmake
runs-on: ${{ matrix.os }}
steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Setup packages on Linux
run: |
sudo apt-get update
sudo apt-get install libzmq3-dev libsocketcan-dev

- name: Setup build system packages on Linux
run: |
sudo apt-get install ninja-build ${{ matrix.buildsystem }}

- name: Checkout
uses: actions/checkout@v4

- name: Build libcsp examples
run: python3 examples/buildall.py --build-system=${{ matrix.buildsystem }}

- name: Build libcsp with python binding with cmake
if: ${{ matrix.buildsystem == 'cmake' }}
run: |
cmake -GNinja -B builddir -DCSP_ENABLE_PYTHON3_BINDINGS=1 -DCSP_USE_RTABLE=1 && ninja -C builddir

- name: Install the latest Meson using Pip if Python is 3.12 or later
# Meson 1.3+ supports Python 3.12 (distutils removed)
if: ${{ matrix.buildsystem == 'meson' && matrix.python-version == '3.12' }}
run: |
pip install meson
meson --version

- name: Build libcsp with python binding with meson
if: ${{ matrix.buildsystem == 'meson' }}
run: |
meson setup builddir -Denable_python3_bindings=true -Duse_rtable=true && ninja -C builddir

- name: Run ZMQ Python binding Test
run: |
build/examples/zmqproxy &
PYTHONPATH=builddir python3 examples/python_bindings_example_server.py &
PYTHONPATH=builddir python3 examples/python_bindings_example_client.py -z localhost -s 27 -a 2
pkill zmqproxy
6 changes: 2 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
#- macos-latest
arch:
- posix
buildsystem:
- meson
- cmake
Expand Down Expand Up @@ -47,7 +45,7 @@ jobs:
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: python3 ./examples/buildall.py ${{ matrix.arch }} --build-system=${{ matrix.buildsystem }}
run: python3 ./examples/buildall.py --build-system=${{ matrix.buildsystem }}

- name: Run Loopback Test
run: |
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/gitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: GitLint

on:
pull_request

jobs:
gitlint:
runs-on: ubuntu-latest
name: Run gitlint against all commits in a PR
steps:

- name: Install python dependencies
run: |
pip3 install gitlint

- name: Checkout the code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Setup Git (pull request)
run: |
git checkout -b this_pr

- name: Run gitlint
if: ${{ github.base_ref }}
env:
BASE_REF: ${{ github.base_ref }}
run: |
gitlint --commits origin/${BASE_REF}..this_pr
15 changes: 15 additions & 0 deletions .github/workflows/linelint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: EOF newline

on:
pull_request

jobs:
linelint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Linelint
uses: fernandrone/linelint@master
19 changes: 19 additions & 0 deletions .linelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 'true' will fix files
autofix: false

# list of paths to ignore, uses gitignore syntaxes (executes before any rule)
ignore:
- /.git
- /zephyr

rules:
# checks if file ends in a newline character
end-of-file:
# set to true to enable this rule
enable: true

# set to true to disable autofix (if enabled globally)
disable-autofix: true

# if true also checks if file ends in a single newline character
single-new-line: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The latest version of the /doc folder is compiled to HTML and hosted on:
Thank you for considering contributing to libcsp! We welcome
contributions from the community to help improve and grow the
project. Please take a moment to review our
[guidelines](./doc/git-commit.md) before opening a Pull Request!
[guidelines](./doc/contributing.md) before opening a Pull Request!

## Software license

Expand Down
1 change: 0 additions & 1 deletion contrib/drivers/can/csp_driver_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,3 @@ csp_iface_t * csp_driver_can_init(int addr, int netmask, int id, can_mode_e mode
return &mcan[id].interface;

}

1 change: 0 additions & 1 deletion contrib/hooks/csp_hook_asf4.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ void csp_reboot_hook(void) {
void csp_shutdown_hook(void) {
NVIC_SystemReset();
}

Loading
Loading