I wonder if a light runtime attribute might be handy for Alire search?
3 posts - 2 participants
I wonder if a light runtime attribute might be handy for Alire search?
3 posts - 2 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
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
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
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
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 there a good ada cheatsheet that anyone prefers for printing and putting on a wall?
5 posts - 3 participants
I have a log package with a private global variable that passes silver mode except for a couple of low upper bound string issues. It has a fixed sized global variable as the log store.
However any external procedure running in spark mode that tries to execute a log function is wanted by spark to have the state or log store listed in itโs global aspect even though it has no access to the private log store directly.
I assume that I am missing something and shall keep reading but any help would be much appreciated? It isnโt workable for me to create global aspects for any procedure that uses my log package. I guess I could pass the log store but I am not sure that that is a good solution.
Thanks
3 posts - 2 participants
When I have added -fstack-check to an ARM cortex light project then I get the build error undefined reference to __gnat_stack_check.
It works fine on a full runtime.
Is that expected?
Can it be fixed?
4 posts - 3 participants
I wonder. Is gnatd.v a better option than
pragma preelaborate
Is preelaborate more compiler portable? Though I do not use the features that it protects against such as dynamic dispatch, so it is simply an unneeded restriction for me with Gnat. However gnatd.v seems to offer more such as in regard to uninitialised variables? Assuming it works as I had no compile issues .
see 7.7
https://docs.adacore.com/spark2014-docs/html/lrm/packages.html
2 posts - 2 participants
svd2ada generates volatile arrays.
e.g. IMR_MR_Field_Array
There are two other options that I believe will work easily with spark. The .Val Hal.UInt32 or a record of booleans with different names instead of the array.
The array makes for simpler code. So before I switch to the value. Could anyone suggest how the Spark compatibility error may be avoided. Editing the svds isnโt ideal but possible. A function or procedure local instantiation would be ideal. Any ideas?
IMR1.MR.Arr(Var) := True;
error: volatile object cannot appear in this context. Spark RM 7.1.3 (10).
Thanks
2 posts - 1 participant