ST-Link vs openocd
For whatever reason I had serious performance issues with st-link v2 on Linux. I shall see if they apply to v3 but I have found that openocd works much better for me.
1 post - 1 participant
For whatever reason I had serious performance issues with st-link v2 on Linux. I shall see if they apply to v3 but I have found that openocd works much better for me.
1 post - 1 participant
Is it possible to determine the bytes of stack space available at runtime. I am thinking about an embedded case but it would likely be useful for desktop use too. This could optimally determine how much data to request from an sd card for batch processing, for example?
6 posts - 4 participants
In general Spark mode can be straight forward (atleast for Silver) but appears to be more work than it is worth for any file that withs a lot of volatiles like those generated by svd2ada.
Would you agree or encourage me to persevere across the learning curve?
Is codepeer a good alternative in this case?
5 posts - 2 participants
When I add
pragma Initialize_Scalars
To my local configuration pragmas on a light runtime.
I get
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
The complete output follows.
gprbuild --target=arm-eabi -d -P/mnt/crypt/elansys/code/Ada/stm32l4r9_hal/stm32l4r9_hal.gpr -XMODE=Compile -XADAFLAGS= -g -j12 -gnat2022 -largs -Wl,-Map=map.txt
Compile
[Ada] stm32_svd-spi.ads
[Ada] stm32_svd-swpmi.ads
[Ada] stm32_svd-rcc.ads
[Ada] stm32_svd-lcd.ads
[Ada] stm32_svd-fpu.ads
[Ada] stm32_svd-opamp.ads
[Ada] stm32_svd-dma.ads
[Ada] stm32_svd-octospim.ads
[Ada] stm32_svd-rtc.ads
[Ada] stm32_svd-syscfg.ads
[Ada] stm32_svd-octospi.ads
[Ada] stm32_svd-crc.ads
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
compilation of stm32_svd-crc.ads failed
compilation of stm32_svd-octospi.ads failed
compilation of stm32_svd-syscfg.ads failed
compilation of stm32_svd-rtc.ads failed
compilation of stm32_svd-octospim.ads failed
compilation of stm32_svd-dma.ads failed
compilation of stm32_svd-opamp.ads failed
compilation of stm32_svd-fpu.ads failed
compilation of stm32_svd-lcd.ads failed
compilation of stm32_svd-rcc.ads failed
compilation of stm32_svd-swpmi.ads failed
compilation of stm32_svd-spi.ads failed
gprbuild: *** compilation phase failed
[2023-01-16 14:11:59] process exited with status 4, 23% (27/113), elapsed time: 00.31s
7 posts - 3 participants
Merry xmas all.
I simplified my Last Chance Handler by using
Interfaces.C.Strings.Value
The compiler output undefined reference to ‘strlen’
light-cortex-m4f/adalib/libgnat.a(i-cstrin.o)
I could go back to my manual string null termination finding function. Or should I look into Gnat. Could someone point me to the right place to report and or submit a patch (is it gerrit that GCC uses or something)?
7 posts - 3 participants
I wonder if a light runtime attribute might be handy for Alire search?
3 posts - 2 participants
I’m not sure of the best way of setting -XMODE=Analyse in Gnat Studio. I wonder if the view mode could set it.
However, I found setting it under preferences => Build Targets by replacing %X works well for me.
It’s also worth realising that there are advanced and basic build targets with basic view being the default.
2 posts - 2 participants
Many IDEs highlight occurences of the current selection. I have seen the Occurences plugin. Is there an automated option upon mouse double click?
Edit: I shall just add a keyboard shortcut for find all references.
Edit 2: I thought I had tried setting the ephemeral highlighting colour and restarting Gnat Studio. Perhaps I didn’t restart as it is working today.
1 post - 1 participant
Programming in Ada 20xx by John Barnes
Ada Distilled by Richard Riehle
https://en.m.wikibooks.org/wiki/Ada_Programming
Please list any favourites or references that you personally turn to?
6 posts - 4 participants
Does anyone else get this 0018 cancel character showing when pressing ctrl->c in view os shell?
4 posts - 3 participants
3 posts - 2 participants
When SVD files are a subproject you get a lot of warnings when running gnatprove on the base address.
Address => NVIC_Base
‘writing to “NVIC_Periph” is assumed to have no effects on other non-volatile objects.’
Is there a good way to quieten those. Such as exclude the SVD sub project or ideally just silence that particular warning?
If I use the --no-subprojects flag then I get some .ali incorrectly formatted fatal errors.
Perhaps I should use this for faster contract generation anyway. However, I believe case statements in .gpr files prevent gnat studio from being able to edit automatically (I can always comment and uncomment the case statements as needed though)
https://docs.adacore.com/spark2014-docs/html/ug/en/spark_mode.html#specifying-files-to-analyze
project My_Project is
type Modes is (“Compile”, “Analyze”);
Mode : Modes := External (“MODE”, “Compile”);
case Mode is
when “Compile” =>
for Source_Dirs use (…);
when “Analyze” =>
for Source_Dirs use (“dir1”, “dir2”);
for Source_Files use (“file1.ads”, “file2.ads”, “file1.adb”, “file2.adb”);
end case;
end My_Project;
2 posts - 1 participant