mbed-os/hal/tests/TESTS/mbed_hal_fpga_ci_test_shield
Hari Limaye f4e5359710 GPIO: Use uintptr_t for gpio_irq_api context
The HAL gpio_irq_api stores object IDs, which serve as a form of context
for the dispatch of the interrupt handler in the drivers level
InterruptIn Class. The way this is achieved is that the InterruptIn
Class casts its address to uint32_t, which is stored as the ID.
This results in compilation failure when the size of an object pointer
is greater than uint32_t, for example when building on a PC for unit
testing.

In order to allow Unit Testing of the InterruptIn Class, we replace the
use of uint32_t with uintptr_t (type capable of holding a pointer),
which allows portability and expresses intentions more clearly.
In aid of this latter goal, we also replace the use of the name "id"
with "context", to improve clarity - these are addresses of the context
related to that callback.
2022-01-26 18:12:52 +00:00
..
analogin CMake: Require TEST_SOURCES in greentea CMake file 2021-06-29 13:33:42 +01:00
gpio CMake: Require TEST_SOURCES in greentea CMake file 2021-06-29 13:33:42 +01:00
gpio_irq GPIO: Use uintptr_t for gpio_irq_api context 2022-01-26 18:12:52 +00:00
i2c CMake: Require TEST_SOURCES in greentea CMake file 2021-06-29 13:33:42 +01:00
pwm CMake: Require TEST_SOURCES in greentea CMake file 2021-06-29 13:33:42 +01:00
spi CMake: Require TEST_SOURCES in greentea CMake file 2021-06-29 13:33:42 +01:00
uart CMake: Require TEST_SOURCES in greentea CMake file 2021-06-29 13:33:42 +01:00
README.md Update FPGA documentation 2021-04-06 15:13:51 +01:00
fpga_test_shield.jpg Move greentea tests closure to library 2020-08-25 15:15:53 +01:00

README.md

Testing with FPGA CI TEST shield

Setup

30% center

mbed test -n "hal-tests-tests*fpga*" --app-config TESTS/configs/fpga.json

The FPGA_FORCE_ALL_PORTS macro can be defined to force all pinouts of all peripherals to be tested. Some FPGA tests only test one pinout of one peripheral by default, to save time.

mbed test -n "hal-tests-tests*fpga*" --app-config TESTS/configs/fpga.json -DFPGA_FORCE_ALL_PORTS

FPGA_CI_TEST_SHIELD needed macro
and specific test capabilities per target
are defined in:
https://github.com/ARMmbed/mbed-os/blob/master/TESTS/configs/fpga.json

MBED-OS

Tested from factor is defined by MBED_CONF_TARGET_DEFAULT_FORM_FACTOR
"default-form-factor" default value is null.

When "default-form-factor" is not set, ARDUINO form factor is used.

Default ff_arduino_pins is defined in: https://github.com/ARMmbed/mbed-os/blob/master/hal/source/mbed_pinmap_default.cpp#L28-L32

Default ff_arduino_names is defined in: https://github.com/ARMmbed/mbed-os/blob/master/hal/source/mbed_pinmap_default.cpp#L34-L38

Default empty_gpio_pinmap is defined in: https://github.com/ARMmbed/mbed-os/blob/master/hal/source/mbed_gpio.c#L89-L114

Some pins are restricted: https://github.com/ARMmbed/mbed-os/blob/master/hal/source/mbed_pinmap_default.cpp#L69-L73

Some peripherals are restricted: https://github.com/ARMmbed/mbed-os/blob/master/hal/source/mbed_pinmap_default.cpp#L94-L100

Known issues

https://github.com/ARMmbed/fpga-ci-test-shield

https://github.com/ARMmbed/fpga-ci-test-shield-updater

https://github.com/ARMmbed/fpga-ci-test-shield-terminal