Page 1 of 1
HAL versions
Posted: Mon Feb 01, 2016 3:22 pm
by king2
I have tried to make new project with ChibiOS from scratch.
I see GPIOv1, GPIOv2 and GPIOv3 folders in LLD, how I can decide which one I should use?
Same question with all folder with versions.
Thanks!
Re: HAL versions
Posted: Mon Feb 01, 2016 4:40 pm
by Giovanni
Hi,
It depends on which STM32 you are using, see the platform.mk file inside the various STM32 subdirectories, the drivers are listed there.
Giovanni
Re: HAL versions
Posted: Mon Feb 01, 2016 6:16 pm
by king2
Thanks!
Re: HAL versions
Posted: Tue Feb 02, 2016 7:32 am
by neums
What is the reason that all the LLD driver files moved to the LLD folder?
Re: HAL versions
Posted: Tue Feb 02, 2016 10:03 am
by Giovanni
Because all those drivers are shared by multiple platforms.
Giovanni
Re: HAL versions
Posted: Wed Jul 20, 2016 8:01 pm
by Al B
Hi,
Some related questions to this.
Other than the platform.mk for each processor family, which describes which LLD peripheral version to use for that processor,
is there any documentation on what the different are between the versions other than doing diff's on the code?
For example, I have made fixes to SDMMCv1 and want to test these on F407, but unfortunately F407 uses SDIOv1.
When looking at these files, other than SDIO vs SDMMC constant naming and 1 define path in SDIOv1 for F2/F4 (in sdc_lld_wait_transaction_end routine) the sdc_lld.c files seem to be the same (i.e. if the STM32_DMA_ADVANCED seems to cover all the F2/F4 specific define paths).
A thought: would consolidating into a single version with backward compatibility provided using defines for the processor differences, make upgrading easier? I.e. introduce the new code with defines if required, but the legacy code is still supported.
Then earlier version XXXv1, XXXv2 files can be maintained (so that all .ld and other linker project files will still work), and demos can be upgraded to latest version if and when time is available to test them out.
And all new code and fixes is applied to the latest versions, and only ported to earlier versions on an as needed basis.
And taking this a step further, if the changes were done in a backwards compatible fashion, maybe most changes wouldn't need a new version number either? Further simplifying processor to LLD linkages.
Thanks,
Al
Re: HAL versions
Posted: Wed Jul 20, 2016 8:21 pm
by Giovanni
hi,
Many LLD drivers have a readme with the compatibility list and other notes, not all currently.
SDIO has been forked not just because naming differences, the peripheral is a bit different too. I think there is a reason if they stopped calling it SDIO and it is now SDMMC, they never changed a name in the past.
Giovanni
Re: HAL versions
Posted: Wed Jul 20, 2016 8:50 pm
by Al B
Hi,
OK, now that you mention it I do see note.txt files in ADC and DMA but no others.
And wrt to the SDIO vs SDMMC, that is unfortunate, since the code seems almost identical other than the naming and clearly defined ifdef code paths. I guess I'll find out pretty soon if the SDC abstraction works across SMDDC vs SDIO.
Hopefully the other ideas I mentioned may be of some use one day.
Thanks,
Al
Re: HAL versions
Posted: Wed Jul 20, 2016 9:45 pm
by Giovanni
I have started adding those readmes in newer drivers, I have to find time to make a pass on old ones

The idea is to document there each driver implementation.
Giovanni