tangle-accelerator
tangle-accelerator copied to clipboard
feat(Endpoint): Implement WP76xx platform
The FX30 gateway used the WP76xx platform. We should implement it.
Analyze the impact to existing HAL and adaption layer.
Never write code in a rush. Always think of the portability, code reusability, and elegance.
The Legato AF provides the "simu" directory for generate test stub. The test stub can replace the HAL inside endpoint. So we only need one "impl.c" in endpoint for all platform. The HAL could be removed after the test passed(#707). However, when executed the endpoint binary. It will generate the error message "Failed to load library 'libComponent_endpointComp.so".
The attribute for different platform like wp77xx,wp76xx. We can set the attribute inside another definition files and import the setting when build the app for the target.
The test scripts for different platform like test-WP77.sh test-WP76.sh will be merged. The build scripts for different platform will be merged.
After I tried to use the simu as platformService test stub provided by the Legato AF. It would raise some weird error during compiling. So I think it is better to define the simulator as test stub will be more easily.
But I think we won't need HAL anymore. We can define the impl.h for the platformService functions we need to use. And only need the simulator and the implementation for the device which legato target had already supported. Only need two platforms inside platform directory:
- simulator: Acts as test stub
- default: The platform had already supported by the Legato AF.
The test-WP77.sh should also change to test-legato-target.sh for test all the target on legato AF.
@jserv what do you think?
Check the subject. You mentioned WP76xx platform rather than the removal of HAL!
We should follow the steps:
- Decide the removal of HAL and validate
simusubstitute - Adapt existing platforms for new interface;
- Documentation as possible;
- Support WP76xx;
The issue of removal of HAL will be moved to #707.
Block by #707