-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stm32 : reduce number of device.h files #2130
Conversation
@adustm @svastm @egostm @jamike @jeromecoutant any feedback ? |
+1 |
@mbed-bot: TEST HOST_OSES=windows |
[Build 631] |
The tests results look OK |
@@ -723,7 +723,7 @@ | |||
"inherits": ["Target"], | |||
"progen": {"target": "nucleo-f303k8"}, | |||
"detect_code": ["0775"], | |||
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"], | |||
"device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "RTC_LSI", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a valid value for device_has RTC_LSI
. It should be set within device.h file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device_has is a control list for generic apis. macros can be used more freely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LMESTM Can you please update it?
@0xc0170 RTC_LSI is already used many other times in target.json ... can this be clean in another PR ? also if the list is restricted can you point to the allowed list of defines and may you consider a check at compilation time ? |
@LMESTM That check is not yet implemented, but yes should be.
Why not within this PR? It shall be faster, or? This does not affect functionality however, we can integrate it as it is, with the follow up PR to clean-up RTC device specific macro |
@0xc0170 it's because I'm out of office so I can't do changes now, just reading emails ☺ ... so either this PR would have to wait till I'm back or we can do it in 2 steps. Up to you - I'm ok to wait as well. |
@LMESTM Can we proceed with this device.h reduction? There are conflicts now, as some of HAL have been updated. |
29179c5
to
a1083d5
Compare
@0xc0170 : now rebased and RTC_LSI moved to "macros" instead of "device_has" as suggested by sg |
@LMESTM sorry for asking to rebase the very last time, let me know if you could do it or I'll do it manually |
a1083d5
to
2cee2fa
Compare
@0xc0170 No problem - this is rebased now |
Device features definition have been moved to targets.json, so definitions in device.h are not required anymore.
device_has is a control list for generic apis, while macros can be used more freely. DEVICE_RTC_LSI being STM32 specific, it is moved to macros.
2cee2fa
to
498de9c
Compare
@0xc0170 I rebased again today as hal/target.json is being modified pretty often - hope your next review happens when there are no conflicts yet :-) |
sorry about that. There's one more for the upcoming release (one breaking change fix), but I'll do it manually if that gets in ;) Thanks |
@0xc0170 Don't be sorry , that's part of the maintainer's role to ask for rebase - if you trig me before you try to merge it, I can do it as well - cheers |
@mbed-bot: TEST HOST_OSES=ALL |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 787 All builds and test passed! |
[Build ${MBED_BUILD_ID}] |
@mbed-bot: TEST HOST_OSES=ALL |
It looks like some CI checks are stuck? In any case, LGTM. |
@@ -0,0 +1,40 @@ | |||
// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this file added, but similar files were removed in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like one file per family of devices. @LMESTM ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - 1 file per family instead of 1 per device as they were almost all the same, so this reduces the overall number of files (with the point to maintenance easier) - thanks for having merged 👍
[Build 883] |
Release mbed-os-5.1.4 Changes: New Targets: 2504: [Disco_F769NI] adding new target [#2504] 2654: DELTA_DFBM_NQ620 platform porting [#2654] 2615: [MTM_MTCONNECT04S] Added support for MTM_MTCONNECT04S [#2615] 2548: Nucleof303ze [#2548] Fixes: 2678: Fixing NCS36510 compile on Linux #2678 2657: [MAX326xx] Removed echoing of characters and carriage return. #2657 2651: Use lp_timer to count time in the deepsleep tests #2651 2645: NUCLEO_F446ZE - Enable mbed5 release version #2645 2643: Fix thread self termination #2643 2634: Updated USBHost for library changes #2634 2633: Updated USBDevice to use Callback #2633 2630: Test names not dependent on disk location of root #2630 2624: CFSTORE Bugfix for realloc() moving KV area and cfstore_file_t data structures not being updated correctly #2624 2623: DISCO_L476VG - Add Serial Flow Control pins + add SERIAL_FC macro #2623 2617: STM32F2xx - Enable Serial Flow Control #2617 2613: Correctly providing directories to build_apis #2613 2607: Fix uvisor memory tracing #2607 2604: Tools - Fix fill section size variation #2604 2601: Adding ON Semiconductor copyright notice to source and header files. #2601 2597: [HAL] Fixed "intrinsic is deprecated" warnings #2597 2596: [HAL] Improve memory tracer #2596 2594: Fix TCPServer constructor #2594 2593: Add app config command line switch for test and make #2593 2589: [NUC472] Fix heap configuration error with armcc #2589 2588: Timing tests drift refactor #2588 2587: add PTEx pins as option for SPI on Hexiwear - for SD Card Interface #2587 2584: Set size of callback irq array to IrqCnt #2584 2583: github issue and PR templates #2583 2582: [GCC_CR] fix runtime hang for baremetal build #2582 2580: lwip - Add check for previously-bound socket #2580 2579: lwip - Fix handling of max sockets in socket_accept #2579 2578: Fix double free in NanostackInterface #2578 2576: Add smoke test that builds example programs with mbed-cli #2576 2575: tools-config! - Allow an empty or mal-formed config to be passed to the config system #2575 2562: Fix GCC lazy init race condition and add test #2562 2559: [utest]: Allow the linker to remove any part of utest if not used #2559 2545: Added define guards for SEQUENTIAL_FLASH_JOURNAL_MAX_LOGGED_BLOBS so #2545 2538: STM32F4xx - Add support of ADC internal channels (Temp, VRef, VBat) #2538 2521: [NUCLEO_F207ZG] Add MBED5 capability #2521 2514: Updated FlexCan and SAI SDK drivers #2514 2487: Runtime dynamic memory tracing #2487 2442: Malloc heap info #2442 2419: [STM32F1] Add asynchronous serial #2419 2393: [tools] Prevent trace-backs from incomplete args #2393 2245: Refactor export subsystem #2245 2130: stm32 : reduce number of device.h files #2130
…..3c7d50e 3c7d50e Remove test files d5f5bee Merge branch 'release_internal' into release_external 72b065b Merge pull request ARMmbed#2133 from ARMmbed/few_updates 1da0b9f Fix unittest cleanup d173249 Adjust GC cleanup threshold and traces 26166d1 Remove ns_sw_mac_packet_ingress_rate_limit_by_mem (ARMmbed#2132) 5305754 Merge pull request ARMmbed#2130 from ARMmbed/IOTTHD-3419 038bc2e Copy ingress rate limiting API to ns_conf 940b516 Fix compiler warnings 64e6ff3 Review corrections 01e7d84 Update GC thresholds, init and traces 1acd1cc Add unit tests for monitor 64c969e Nanostack heap garbage collection d3330b2 Fix errors found by Coverity (ARMmbed#2131) da5d2c7 MAC, RPL and ETX trace clean. eaf8907 Limit amount of incoming packet based on memory (ARMmbed#2128) 0c2b383 Fixed unitest header size compare value for support brodacst shedule. 6c70262 Wi-sun LLC update 7c57343 WS PAN Config handler update 161421b Wi-sun PAN_VERSION lifetime and timeout update 43083ed Fixed broken wi-sun neigbour black list filtering. 0992ee2 Update Pan information data from all selected parent. cafc142 Fixed Pan advertisment route cost comapre for consistent and incosistent db81d02 SW MAC timestamp read update eddf91b Wi-sun neighbor generate limitation 4d6abb3 Added 15 second guarantee time for packet handler before remove link. 9ed97eb SW MAC new API for read current timestamp 6a44829 Stop advertisment RPL prefix if we not have a address and it is not 'A-flag' d37ce6a Revert "Wi-sun dublicate MPX ID filter support" d80ebf8 Fix debug trace format. b1ef0f6 Removed Address reg pending and rady mask from address. ce672ba Added trace for debugging DHCPv6 failure reason. aaf2b39 Wi-sun dublicate MPX ID filter support bd51f9f Merge pull request ARMmbed#2117 from ARMmbed/IOTTHD-3587 b016d52 Fixed DHCPv6 client delete when address was removed to new network discovery. 69fb24b Wi-sun address registration and RPL update 92d3a92 RPL: trace new preferred parent 9a6e4e0 disable multicast NS for wisun 6e13d81 Merge pull request ARMmbed#2113 from ARMmbed/IOTTHD-3577 85aaae7 Refactored the Wi-SUN BBR logic according to design 61f6f5b WS: Added ws stats empty functions ac191c3 Removed link local address verifycation and dead code. 77076d1 Negative ARO timeout use same timeout than not trusted device. c4e8735 Wi-sun DHCP solicit max to 15min from 60min. 66615e6 Updated wi-sun BBR min hop rank increase to 196. 9ce41f1 Pendig address registration will move DAO send. f54ea6b Merge pull request ARMmbed#2110 from ARMmbed/IOTTHD-3577 18dbac2 WS: Implemented ws statistics 3ce95fa FHSS WS: Fixed drift compensation stats b878bd9 KMP address update 7f18afe PAE controller and NVM update f692eb8 Wi-SUN border router configure update 386e5ff Wi-sun Update 05b1fe8 do not send periodic DIO messages if DAO registration is not done 6acee47 modified RSL calculation and value in messaging ee7f218 Modify discovery start timing 1ba806d Wi-SUN NUD send fix 31fb8cd Moved counter config to config.h cf18063 Added storing of MAC frame counter to NVM 68adb36 Neighbor cache update 8cdd961 Added possibility for Update DHCPv6 client server address. 2dfa536 Merge pull request ARMmbed#2099 from ARMmbed/IOTTHD-3231 8dc200b FHSS: Created statistics for WS 5e67f7c RPL update bbae493 wi-sun RPL param update e8567d7 MAC neighbour remove and add trace simplify. 8bb4ab5 Cleaned unnessary debug trace. 3608153 DIO prefix handler update 332735b Disabled Version number periodic update if Dodag max rank inrease is not 0. 940de0b Wi-SUN setup update: c1a89e5 Merge pull request ARMmbed#2095 from ARMmbed/IOTTHD-3474 f6d81b5 Review corrections 7487ca1 Fix clang-6.0 build error and warnings cce3fc7 Security protocols are no longer started second time on authenticator git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 3c7d50e
Changes: New Targets: #2504: [Disco_F769NI] adding new target [ARMmbed/mbed-os#2504] #2654: DELTA_DFBM_NQ620 platform porting [ARMmbed/mbed-os#2654] #2615: [MTM_MTCONNECT04S] Added support for MTM_MTCONNECT04S [ARMmbed/mbed-os#2615] #2548: Nucleof303ze [ARMmbed/mbed-os#2548] Fixes: #2657: [MAX326xx] Removed echoing of characters and carriage return. [ARMmbed/mbed-os#2657] #2651: Use lp_timer to count time in the deepsleep tests [ARMmbed/mbed-os#2651] #2643: Fix thread self termination [ARMmbed/mbed-os#2643] #2623: DISCO_L476VG - Add Serial Flow Control pins + add SERIAL_FC macro [ARMmbed/mbed-os#2623] #2617: STM32F2xx - Enable Serial Flow Control [ARMmbed/mbed-os#2617] #2601: Adding ON Semiconductor copyright notice to source and header files. [ARMmbed/mbed-os#2601] #2597: [HAL] Fixed "intrinsic is deprecated" warnings [ARMmbed/mbed-os#2597] #2589: [NUC472] Fix heap configuration error with armcc [ARMmbed/mbed-os#2589] #2587: add PTEx pins as option for SPI on Hexiwear - for SD Card Interface [ARMmbed/mbed-os#2587] #2584: Set size of callback irq array to IrqCnt [ARMmbed/mbed-os#2584] #2582: [GCC_CR] fix runtime hang for baremetal build [ARMmbed/mbed-os#2582] #2562: Fix GCC lazy init race condition and add test [ARMmbed/mbed-os#2562] #2538: STM32F4xx - Add support of ADC internal channels (Temp, VRef, VBat) [ARMmbed/mbed-os#2538] #2514: Updated FlexCan and SAI SDK drivers [ARMmbed/mbed-os#2514] #2442: Malloc heap info [ARMmbed/mbed-os#2442] #2419: [STM32F1] Add asynchronous serial [ARMmbed/mbed-os#2419] #2130: stm32 : reduce number of device.h files [ARMmbed/mbed-os#2130] #2678: Fixing NCS36510 compile on Linux [ARMmbed/mbed-os#2678] #2607: Fix uvisor memory tracing [ARMmbed/mbed-os#2607] #2596: [HAL] Improve memory tracer [ARMmbed/mbed-os#2596] #2487: Runtime dynamic memory tracing [ARMmbed/mbed-os#2487]
Now that features (device_has) is defined in targets.json, the device.h file is almost empty and is the same for a complete stm32 family. So we brought it in upper directory for all STM32 families. It reduces the number of files to maintain.