Commit Graph

1433 Commits

Author SHA1 Message Date
Pat Rogers 1c179807ef
Merge pull request #427 from simonjwright/callgraph
Provide control over -fcallgraph-info in project wizard.
2024-02-27 11:26:52 -06:00
Simon Wright eca308e040 Provide control over -fcallgraph-info in project wizard.
In [GCC PR 104342](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104342)
we can see that, if checking out a non-release compiler (e.g. GCC
14.0.1), having `-gnata` and `-fcallgraph-info=su` will cause a crash
(in stm32 code, anyway).

`-gnata` is used when Build is Debug.

This patch amends the Project Wizard so you can specify `CALLGRAPHS=Disabled`.

  * scripts/project_wizard.py (Build_Checks_Type): renamed to
      Disabled_Or_Enabled_Type.
    (Build_Checks): now Disabled_Or_Enabled_Type.
    (Callgraphs): new, checks external CALLGRAPHS, default Enabled. Used
      to decide whether to include -fcallgraph-info=su even if Target
      isn't riscv32-unknown-elf.
2024-02-27 15:52:11 +00:00
Maxim Reznik c45af336d0 Add missing `aliased` keywords in STM32_F4VE board
to allow `'Access` attributes
2023-12-20 18:23:27 +02:00
Maxim Reznik 503ec28492 Check that each supported board is mentioned in README.md 2023-12-06 16:38:32 +02:00
Maxim Reznik 22ae2aea53 Add more readme files. 2023-12-06 16:38:32 +02:00
Maxim Reznik 4615730b4e Add UART at J6 connector to STM32.Board package 2023-12-06 16:38:32 +02:00
Maxim Reznik 580945562d Add touch panel to stm32_f4ve board 2023-12-06 16:38:32 +02:00
Maxim Reznik 3d584b8f9b Add XPT2046 touch panel driver 2023-12-06 16:38:32 +02:00
Maxim Reznik 724b7462a4 Add TFT LCD ILI9341 to STM32 F4VE board. 2023-12-06 16:38:32 +02:00
Maxim Reznik 7232cb4069 Add STM32 F4VE board. 2023-12-06 16:38:32 +02:00
Maxim Reznik 945dde1dbc Add FSMC for stm32f40X 2023-12-06 16:38:32 +02:00
Maxim Reznik b60639de8b Add optimized version of Fill and Copy_Rect 2023-12-06 16:38:32 +02:00
Maxim Reznik 639e9031fb Split ili9341 into several files
* ili9341-device.ads - generic driver for display
* ili9341-spi_connector.ads - the chip with SPI interface
* ili9341-device-bitmap.ads - implement Bitmap API on the ILI9341 RAM
* ili9341-rgb_spi_device.ads - display with RGB interface
2023-12-06 16:38:32 +02:00
Maxim Reznik fd4e628835 Drop unused type (Orientation_Mode) from HAL.Bitmap 2023-12-06 16:38:32 +02:00
Maxim Reznik f79cd470a0 Add SD card examples for `stm32f4xx_m`. 2023-12-06 16:38:32 +02:00
Maxim Reznik dfbc15d772 Add more READMEs 2023-12-06 16:38:32 +02:00
Maxim Reznik 5712224102 Move STM32.Board package for stm32f4xx_m
into `boards/stm32f4xx_m/src/` to have it closer to other sources.
2023-12-06 16:38:32 +02:00
Maxim Reznik 0aaf152c5b Create Flash memory in STM32.Board for stm32f4xx_m
Move flash initialization code into STM32.Board.
2023-12-06 16:38:32 +02:00
Maxim Reznik 51e21e7160 Add SD card to stm32f4xx_m board 2023-12-06 16:38:32 +02:00
Maxim Reznik 2e50b6885c Allow SD card detection pin to be shared with DAT3 pin.
In this configuration SDCard_Controller detects SD card
only betwee Initialize call and Card_Present=True.
After Card_Present because True the controller reconfigures
DAT3 to SDIO mode.
2023-12-06 16:38:32 +02:00
Maxim Reznik 31e36cf1c2 Fix LED on/off routines.
LED is on when pin output is zero.
2023-12-06 16:38:32 +02:00
Maxim Reznik e4e1148eb9 Limit Python version to 3.11 in the GitHub Action
as the distutils package has been removed in Python version 3.12.
2023-12-01 14:45:54 +02:00
Maxim Reznik f5f17346d8 Move 'for Target use xxx;' up
to fix loading project in VSCode extension and avoid

> error: cannot set configuration attribute "Target" after it was referenced

See details in GPR issue #166.
2023-12-01 14:45:54 +02:00
Maxim Reznik f607a9a7b7 Add HAL for flash memory chips and an example
for w25q16bv on stm32f4xx_m.
2023-10-14 18:17:58 +03:00
Maxim Reznik b451a32266 Add STM32F4XX M DevEBox board
https://stm32-base.org/boards/STM32F407VGT6-STM32F4XX-M
2023-10-14 18:17:58 +03:00
Fabien Chouteau 13b379aad3
Switch to GNAT FSF 12 support (#418)
* Switch to GNAT FSF 12 support

* GNAT FSF 12 in GitHub CI

* Update README.md

* Remove run-time dependency build script that is not compatible with GNAT FSF

This script is also not needed as all the BSPs are included in GNAT FSF.
2023-01-02 11:34:55 +01:00
Simon Wright bbdc182bdf
Correct the transmit protocol for Nordic TWI. (#417)
* Correct the transmit protocol for Nordic TWI.
The register address and the data must be sent in one operation, as
specified in the nRF51 Series Reference Manual version 3.0.

  * arch/ARM/Nordic/drivers/nrf_common/nrf-twi.adb:
    (Master_Transmit): Clear any previous Suspend/Stop settings before
      the transfer.
      Only do a Stop_Sequence if requested.
    (Mem_Write): Call Master_Transmit to send the data as well as the
      register address in one transaction. This requires moving the
      Do_Stop_Sequence setting to before this single transaction.

* Revert Nordic TWI Mem_Write to original.

Avoids creating a potentially large data buffer on the stack.

  * arch/ARM/Nordic/drivers/nrf_common/nrf-twi.adb (Mem_Write): reverted to
      sending the register address without a stop sequence, followed by the
      data, followed by a stop sequence.
2022-12-05 16:19:36 +01:00
Andrey Fil 647eac212a
install_dependencies.py Support for utf-8 stdout returned text for Linux (#416) 2022-11-28 15:53:29 +01:00
Rolf Ebert 9e3933a635
add new IO expander MCP23017 (2x8bits) (#415)
* add new IO expander MCP23017 (2x8bits), copying the design of the existing MCP23008

* correct casing style issues, revert to parenthesis for array access

* correct more style issues
2022-11-07 10:40:51 +01:00
Rolf Ebert 3c04f38bed
implement function Mode to fix issue #412 (#413) 2022-07-28 18:15:41 +02:00
Rolf Ebert 791616adf3
New component: text LCD (#405)
* new component: the old pcf8574 8bit io-expander.

* correct interface to current HAL (v0.3)

* make address and I2C_Port discriminants, so that variables cannot be declared without initialization

* cleared style issues (missing blanks) and made the type limited

* first working version of a HD44780 LCD driver, based on I2C PCF8574

* use controlling parameter directly in in out mode, not the pointer to class wide

* make the call to Output dispatching

* corrected GNAT style issues

* add support for user defined custom characters

* use standard Adacore copyright notice

* remove unneeded with clause
2022-06-14 09:45:25 +02:00
Pat Rogers 249e15f6e6
Refine and strengthen package Audio (#410)
audio.ads:
Add precondition for protected procedure Start to ensure valid addresses.
Minor name improvements.

main.adb
Add Last_Chance_Handler to indicate when exceptions raised, if any.
Minor formatting
2022-05-31 16:08:33 +02:00
Pat Rogers da9464829e
corrections to serial_io facilities (#409)
demo-*:
use Unchecked_Access in these specific demos

serial_io-blocking.ads:
correct postcondition on procedure Receive so that empty content is handled properly

serial_io-nonblocking.ads:
add postconditions to procedure Receive
2022-05-30 15:40:25 +02:00
Pat Rogers 1dfd1ddf14
Significantly simplify Serial_IO.Nonblocking and revise associated files (#407)
* Significantly simplify Serial_IO.Nonblocking and revise associated files

serial_io:
Use better name for hardware init routines

serial_io.nonblocking:
Implement primary type Serial_Port directly as a protected type.
Add discriminant for IRQ priority.
Simplify transmission routine (remove a protected variable).
Remove pre/post for initialization since not worth extra complexity for type impl.
Use better names as replacements for Put/get.

serial_io.blocking:
Update names for procedures Put and Get to be same as those of package Nonblocking.
Update name for hardware init routine to be consistent with other packages.
Remove pre/post for initialization since not worth extra complexity for type impl.

serial_io.streaming:
Update names for procedures Put and Get to be same as in Blocking and Nonblocking.
Update name for hardware init routine to be consistent with other packages.
Remove pre/post for initialization since not worth extra complexity for type impl.

peripherals_nonblocking:
Specify new IRQ priority discriminant.
Remove unnecessary constant.
Improve comments.

peripherals_blocking:
Improve comments.

peripherals_streaming:
Improve comments.

demo mains:
Revise for name changes.
Improve comments.

* remove trailing blanks
2022-05-24 17:33:18 +02:00
mbdme26 fad121a9f2
Changes has been made to the i2c inicialization (#402)
* Changes has been made to the i2c inicialization, specifically in the SDA and SCL pins

* All changes requested has been made

* Style issues solved
2022-04-19 15:12:35 +02:00
Jeremy Grosser dc9cc80f53 Add pragma Preelaborate to all HAL packages. 2022-02-23 17:42:42 +01:00
Marc Poulhiès 9cfecd5085 Small typo fix
Trivial typo fix.
2022-02-22 10:16:47 +01:00
Simon Wright ac2a336f16 Add support for the ST VL53L1X Time-of-Flight sensor. 2022-01-24 11:50:19 +01:00
Simon Wright dfaebbc1a5 Rework PMW3901 calibration parameters.
Uses timing/calibration parameters from github PX4/PX4-Autopilot\
/blob/master/src/drivers/optical_flow/pmw3901/PMW3901.cpp.

  * components/src/motion/pmw3901/pmw3901.adb (Initialize): delays to
      match PX4 code.
    (Calibrate): likewise, plus calibration data.
2021-11-30 10:25:14 +01:00
Simon Wright e49974bf3c Components: add I2C, SPI drivers for LPS25H barometric sensor. 2021-11-30 10:17:52 +01:00
Pat Rogers 2cda6a58ad
clean up the inline assembly language for procedure Lock_The_Pin (#392)
* clean up the inline assembly language for procedure Lock_The_Pin

* clean up the inline assembly language for procedure Lock_The_Pin
2021-11-04 11:21:58 +01:00
Fabien Chouteau dfb681724f
SGTL5000: fix I2C_Write and a few config procedures (#389)
The current implementation worked fine on the STM32F4, but it could be
because the I2C Mem_Write is not correctly implemented for this
microcontroller.
2021-07-22 10:04:52 +02:00
Jeremy Grosser 3a38be021b
Add Cortex_M.Hints, which provides access to hint instructions like Wait_For_Interrupt (WFI) (#387) 2021-06-29 10:51:58 +02:00
Fabien Chouteau d1bec4f6bb
scipts/install_dependencies.py: fix branch error and exit early on error (#388) 2021-06-28 18:20:09 +02:00
Fabien Chouteau 0ccb49fb9f
Community 2021 (#386)
* Update for GNAT Community 2021

* Update workflow for CE2021
2021-05-26 12:24:22 +02:00
Simon Wright f100ce784e
Use symbolic interrupt priority for SDMMC. (#382)
* Use symbolic interrupt priority for SDMMC.

  * arch/ARM/STM32/drivers/sd/stm32-sdmmc_interrupt.ads
    (SDMMC_Interrupt_Handler): Supply the required interrupt priority via
      a discriminant.

* Added omitted 'with System'.

  * arch/ARM/STM32/drivers/sd/stm32-sdmmc_interrupt.ads: as summary.

* Matching change for boards where SDCard is used.

 * boards/stm32_common/sdcard/sdcard.adb (SD_Interrupt_Handler):
     include Priority discriminant.
2021-03-11 11:53:35 +01:00
Ahmed Hamdy 663a729926
LSM303AGR driver implementation (#380) 2021-01-08 12:19:47 +01:00
Fabien Chouteau a407ca7ddb
Remove unused code (#378) 2020-12-14 17:08:28 +01:00
Fabien Chouteau 00cc208e37
Micro:bit: detect incompatible accelerometers (#376) 2020-12-01 11:43:59 +01:00
Fabien Chouteau acf34d580c
Cortex-M systick: Fix TICKINT values (#377)
The fix was fixed in the SVD files [1] but not in ADL.

[1] c2fb35bfc9
2020-12-01 10:19:51 +01:00