Skip to content

changed Makefile.test, updated submodule for arduino-core-tests #336

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

Merged
merged 5 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ err.xml
docs/build
docs/source/_build
__pycache__/
_build/
_build/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why adding echo command in .gitignore?

Copy link
Contributor Author

@Frederikwag Frederikwag Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because everything what is related to SPI is a different branch.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check: https://www.geeksforgeeks.org/what-is-git-ignore-and-how-to-use-it/
and: https://www.geeksforgeeks.org/echo-command-in-linux-with-examples/

to understand real reason why you want to use echo and add the path in .gitignore and why I ask you to remove this code.

echo "libraries/SPI/src/SPI.cpp" >> .gitignore
echo "set_all_pins_input.ino" >> .gitignore
echo "src/" >> .gitignore
echo "tests/minimal_test.ino" >> .gitignore
32 changes: 24 additions & 8 deletions tests/Makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,40 @@
##CAN

# 1 board, no wire
make FQBN=Infineon:xmc:XMC1400_XMC2GO PORT=COM42 UNITY_PATH=\Unity test_can_single monitor
make FQBN=arduino-git:xmc:XMC1400_XMC2GO PORT=COM42 UNITY_PATH=\Unity test_can_single monitor

# 2 boards
make FQBN=Infineon:xmc:XMC1400_XMC2GO PORT=COM42 UNITY_PATH=\Unity test_can_connected2_node2 monitor
make FQBN=Infineon:xmc:XMC1400_XMC2GO PORT=COM41 UNITY_PATH=\Unity test_can_connected2_node1 monitor
make FQBN=arduino-git:xmc:XMC1400_XMC2GO PORT=COM42 UNITY_PATH=\Unity test_can_connected2_node2 monitor
make FQBN=arduino-git:xmc:XMC1400_XMC2GO PORT=COM41 UNITY_PATH=\Unity test_can_connected2_node1 monitor


## IIC

# 1 board "talking to itself", wire needed
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM28 UNITY_PATH=\Unity test_wire_connected1_pingpong monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=COM28 UNITY_PATH=\Unity test_wire_connected1_pingpong monitor

# 2 boards
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM85 test_wire_connected2_masterpingpong monitor
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM28 test_wire_connected2_slavepingpong monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_wire_connected2_masterpingpong monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM1 test_wire_connected2_slavepingpong monitor


## UART

# 2 boards
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM71 test_uart_connected2_tx monitor
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM28 test_uart_connected2_rx monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_uart_connected2_tx monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM1 test_uart_connected2_rx monitor

DigitalIO

# 1 boards

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for gpio, we do need a test_config.h for pin definition right? Should it be added to the PR?

make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM1 UNITY_PATH=\Unity test_digitalio_single monitor

## SPI

# 2 boards
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_spi_connected2_master monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM1 test_spi_connected2_slave monitor

# 1 board, loopback
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_spi_connected1_loopback monitor
20 changes: 20 additions & 0 deletions tests/test_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @file test_config.h
* @brief Configuration file for board-specific test pin definitions.
*
* This header file contains the definitions of the pins used for testing
* purposes on the specific board. These pins are configured as output and
* input pins for various test scenarios.
*
* Used Board: XMC4700
*/
#ifndef TEST_CONFIG_H
#define TEST_CONFIG_H

#include <stdint.h>

// test defines
const uint8_t TEST_DIGITALIO_OUTPUT = 7; // IO0
const uint8_t TEST_DIGITALIO_INPUT = 8; // IO1

#endif // TEST_CONFIG_H
Loading