Skip to content
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

✨ (os): Implement ApplyUpdate + registerOnUpdateLoaded #586

Merged
merged 3 commits into from
Mar 16, 2022

Conversation

YannLocatelli
Copy link
Member

No description provided.

@YannLocatelli YannLocatelli self-assigned this Mar 15, 2022
@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #586 (2767983) into develop (378acab) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 2767983 differs from pull request most recent head e818055. Consider uploading reports for the commit e818055 to get more accurate results

@@            Coverage Diff            @@
##           develop      #586   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          107       107           
  Lines         1698      1704    +6     
=========================================
+ Hits          1698      1704    +6     
Impacted Files Coverage Δ
libs/RobotKit/include/RobotController.h 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@github-actions
Copy link

github-actions bot commented Mar 15, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 140204 (53%) 121940 (46%) 29512 (5%)
os 247388 (15%) 1317284 (84%) 32368 (6%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 222588 (10%)
247388 (11%)
📈
24800 (11%)
31144 (5%)
32368 (6%)
📈
1224 (3%)
bootloader ✔️ 140204 (6%) ø 29512 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 258168 (12%) ø 35272 (6%) ø
certs_emc_ble_led_motors ✔️ 191600 (9%) ø 30976 (5%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 165248 (7%) ø 28680 (5%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 194032 (9%) ø 30384 (5%) ø
spike_lk_ble ✔️ 183968 (8%) ø 30376 (5%) ø
spike_lk_bluetooth ✔️ 91192 (4%) ø 17472 (3%) ø
spike_lk_cg_animations ✔️ 149224 (7%) ø 30416 (5%) ø
spike_lk_color_kit ✔️ 88800 (4%) ø 19624 (3%) ø
spike_lk_coreled ✔️ 88556 (4%) ø 19632 (3%) ø
spike_lk_event_queue ✔️ 84664 (4%) ø 18136 (3%) ø
spike_lk_file_reception ✔️ 331612 (15%) ø 33536 (6%) ø
spike_lk_filesystem_kit ✔️ 127740 (6%) ø 20216 (3%) ø
spike_lk_flash_memory ✔️ 87352 (4%) ø 17512 (3%) ø
spike_lk_lcd ✔️ 155544 (7%) ø 30064 (5%) ø
spike_lk_led ✔️ 88808 (4%) ø 19400 (3%) ø
spike_lk_led_kit ✔️ 109516 (5%) ø 20576 (3%) ø
spike_lk_log_kit ✔️ 92000 (4%) ø 18168 (3%) ø
spike_lk_motors ✔️ 86576 (4%) ø 17552 (3%) ø
spike_lk_reinforcer ✔️ 91808 (4%) ø 20232 (3%) ø
spike_lk_rfid ✔️ 91008 (4%) ø 17472 (3%) ø
spike_lk_sensors_battery ✔️ 87600 (4%) ø 18584 (3%) ø
spike_lk_sensors_light ✔️ 84584 (4%) ø 17512 (3%) ø
spike_lk_sensors_microphone ✔️ 85336 (4%) ø 17512 (3%) ø
spike_lk_sensors_temperature_humidity ✔️ 90896 (4%) ø 17496 (3%) ø
spike_lk_sensors_touch ✔️ 92248 (4%) ø 17632 (3%) ø
spike_lk_serial_number ✔️ 82400 (3%) ø 17544 (3%) ø
spike_lk_ticker_timeout ✔️ 83224 (3%) ø 17592 (3%) ø
spike_lk_update_process_app_base ✔️ 145204 (6%) ø 21352 (4%) ø
spike_lk_update_process_app_update ✔️ 100968 (4%) ø 18472 (3%) ø
spike_lk_wifi ✔️ 131280 (6%) ø 20832 (3%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84688 (4%) ø 18448 (3%) ø
spike_stl_cxxsupport ✔️ 84000 (4%) ø 17536 (3%) ø

🗺️ Map files diff output

Click to show diff list
LekaOS (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/LekaOS-map.txt	2022-03-16 11:24:53.401501421 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/LekaOS-map.txt	2022-03-16 11:24:53.685505156 +0000
@@ -1,22 +1,27 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       436(+436) |     13(+13) |       80(+80) |
+| [fill]                  |       412(+412) |       9(+9) |       80(+80) |
 | [lib]/BLEKit.a          |     1154(+1154) |       0(+0) |         0(+0) |
-| [lib]/BatteryKit.a      |       296(+296) |       0(+0) |         0(+0) |
+| [lib]/BatteryKit.a      |       260(+260) |       0(+0) |         0(+0) |
 | [lib]/CoreBattery.a     |       472(+472) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a  |       122(+122) |       0(+0) |         0(+0) |
+| [lib]/CoreFlashMemory.a |       546(+546) |       0(+0) |         0(+0) |
+| [lib]/CoreQSPI.a        |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a     |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a   |       738(+738) |       0(+0) |         0(+0) |
+| [lib]/FirmwareKit.a     |       172(+172) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/c.a               |   37008(+37008) | 2572(+2572) |       97(+97) |
+| [lib]/bootutil.a        |     1282(+1282) |     12(+12) |     132(+132) |
+| [lib]/c.a               |   42224(+42224) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a               |       360(+360) |       0(+0) |         0(+0) |
-| [lib]/mbed-os-static.a  | 144150(+144150) |   705(+705) | 19399(+19399) |
+| [lib]/mbed-os-static.a  | 158470(+158470) |   769(+769) | 19555(+19555) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |     5424(+5424) |       8(+8) |       44(+44) |
-| main.cpp.obj            |     5640(+5640) |     66(+66) |   7840(+7840) |
-| Subtotals               | 202736(+202736) | 3368(+3368) | 27488(+27488) |
-Total Static RAM memory (data + bss): 30856(+30856) bytes
-Total Flash memory (text + data): 206104(+206104) bytes
+| main.cpp.obj            |     6490(+6490) |     66(+66) |   8696(+8696) |
+| Subtotals               | 225960(+225960) | 3440(+3440) | 28632(+28632) |
+Total Static RAM memory (data + bss): 32072(+32072) bytes
+Total Flash memory (text + data): 229400(+229400) bytes
 
Flash used: 247388&nbsp;(11%) / total: 2097152
SRAM used: 32368&nbsp;(6%) / total: 524288

@github-actions
Copy link

github-actions bot commented Mar 15, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 140204 (53%) 121940 (46%) 29512 (5%)
os 238152 (15%) 1326520 (84%) 26360 (5%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 213080 (10%)
238152 (11%)
📈
25072 (11%)
25136 (4%)
26360 (5%)
📈
1224 (4%)
bootloader ✔️ 140204 (6%) ø 29512 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 250624 (11%) ø 29240 (5%) ø
certs_emc_ble_led_motors ✔️ 174568 (8%) ø 24952 (4%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 148840 (7%) ø 22528 (4%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 177960 (8%) ø 24360 (4%) ø
spike_lk_ble ✔️ 174508 (8%) ø 24360 (4%) ø
spike_lk_bluetooth ✔️ 73256 (3%) ø 11448 (2%) ø
spike_lk_cg_animations ✔️ 141016 (6%) ø 24416 (4%) ø
spike_lk_color_kit ✔️ 65584 (3%) ø 13624 (2%) ø
spike_lk_coreled ✔️ 76164 (3%) ø 13688 (2%) ø
spike_lk_event_queue ✔️ 74736 (3%) ø 12072 (2%) ø
spike_lk_file_reception ✔️ 326904 (15%) ø 27576 (5%) ø
spike_lk_filesystem_kit ✔️ 103540 (4%) ø 14048 (2%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_lcd ✔️ 142584 (6%) ø 23992 (4%) ø
spike_lk_led ✔️ 65744 (3%) ø 13392 (2%) ø
spike_lk_led_kit ✔️ 101516 (4%) ø 14640 (2%) ø
spike_lk_log_kit ✔️ 68528 (3%) ø 11912 (2%) ø
spike_lk_motors ✔️ 62528 (2%) ø 11488 (2%) ø
spike_lk_reinforcer ✔️ 72968 (3%) ø 14240 (2%) ø
spike_lk_rfid ✔️ 73072 (3%) ø 11448 (2%) ø
spike_lk_sensors_battery ✔️ 78196 (3%) ø 12568 (2%) ø
spike_lk_sensors_light ✔️ 60056 (2%) ø 11440 (2%) ø
spike_lk_sensors_microphone ✔️ 72496 (3%) ø 11504 (2%) ø
spike_lk_sensors_temperature_humidity ✔️ 66968 (3%) ø 11424 (2%) ø
spike_lk_sensors_touch ✔️ 68600 (3%) ø 11432 (2%) ø
spike_lk_serial_number ✔️ 58560 (2%) ø 11424 (2%) ø
spike_lk_ticker_timeout ✔️ 69052 (3%) ø 11632 (2%) ø
spike_lk_update_process_app_base ✔️ 122724 (5%) ø 15288 (2%) ø
spike_lk_update_process_app_update ✔️ 77632 (3%) ø 12352 (2%) ø
spike_lk_wifi ✔️ 116392 (5%) ø 14808 (2%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 63208 (3%) ø 12448 (2%) ø
spike_stl_cxxsupport ✔️ 58456 (2%) ø 11400 (2%) ø

🗺️ Map files diff output

Click to show diff list
LekaOS (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/LekaOS-map.txt	2022-03-16 11:23:25.706942830 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/LekaOS-map.txt	2022-03-16 11:23:25.986945106 +0000
@@ -1,20 +1,25 @@
-| Module                 |           .text |       .data |          .bss |
-|------------------------|-----------------|-------------|---------------|
-| [fill]                 |       374(+374) |     13(+13) |       84(+84) |
-| [lib]/BLEKit.a         |     1154(+1154) |       0(+0) |         0(+0) |
-| [lib]/BatteryKit.a     |       296(+296) |       0(+0) |         0(+0) |
-| [lib]/CoreBattery.a    |       472(+472) |       0(+0) |         0(+0) |
-| [lib]/CoreEventQueue.a |       154(+154) |       0(+0) |         0(+0) |
-| [lib]/CoreTimeout.a    |       204(+204) |       0(+0) |         0(+0) |
-| [lib]/HelloWorld.a     |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/c.a              |   36984(+36984) | 2572(+2572) |       97(+97) |
-| [lib]/gcc.a            |     7084(+7084) |       0(+0) |         0(+0) |
-| [lib]/mbed-os-static.a | 140626(+140626) |   705(+705) | 19363(+19363) |
-| [lib]/misc             |       188(+188) |       4(+4) |       28(+28) |
-| [lib]/nosys.a          |         32(+32) |       0(+0) |         0(+0) |
-| [lib]/stdc++.a         |     4116(+4116) |       8(+8) |       28(+28) |
-| main.cpp.obj           |     3326(+3326) |     66(+66) |   1880(+1880) |
-| Subtotals              | 195104(+195104) | 3368(+3368) | 21480(+21480) |
-Total Static RAM memory (data + bss): 24848(+24848) bytes
-Total Flash memory (text + data): 198472(+198472) bytes
+| Module                  |           .text |       .data |          .bss |
+|-------------------------|-----------------|-------------|---------------|
+| [fill]                  |       458(+458) |       9(+9) |       84(+84) |
+| [lib]/BLEKit.a          |     1154(+1154) |       0(+0) |         0(+0) |
+| [lib]/BatteryKit.a      |       296(+296) |       0(+0) |         0(+0) |
+| [lib]/CoreBattery.a     |       472(+472) |       0(+0) |         0(+0) |
+| [lib]/CoreEventQueue.a  |       154(+154) |       0(+0) |         0(+0) |
+| [lib]/CoreFlashMemory.a |       546(+546) |       0(+0) |         0(+0) |
+| [lib]/CoreQSPI.a        |       160(+160) |       0(+0) |         0(+0) |
+| [lib]/CoreTimeout.a     |       204(+204) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a   |       738(+738) |       0(+0) |         0(+0) |
+| [lib]/FirmwareKit.a     |       172(+172) |       0(+0) |         0(+0) |
+| [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
+| [lib]/bootutil.a        |     1282(+1282) |     12(+12) |     132(+132) |
+| [lib]/c.a               |   42336(+42336) | 2572(+2572) |       97(+97) |
+| [lib]/gcc.a             |     7084(+7084) |       0(+0) |         0(+0) |
+| [lib]/mbed-os-static.a  | 154946(+154946) |   769(+769) | 19519(+19519) |
+| [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
+| [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
+| [lib]/stdc++.a          |     4116(+4116) |       8(+8) |       28(+28) |
+| main.cpp.obj            |     4152(+4152) |     66(+66) |   2736(+2736) |
+| Subtotals               | 218584(+218584) | 3440(+3440) | 22624(+22624) |
+Total Static RAM memory (data + bss): 26064(+26064) bytes
+Total Flash memory (text + data): 222024(+222024) bytes
 
Flash used: 238152&nbsp;(11%) / total: 2097152
SRAM used: 26360&nbsp;(5%) / total: 524288

@YannLocatelli YannLocatelli marked this pull request as ready for review March 15, 2022 23:06
app/os/main.cpp Outdated
Comment on lines 35 to 37
auto coremanageris25lp = CoreFlashManagerIS25LP016D(coreqspi);
auto coreis25lp = CoreFlashIS25LP016D(coreqspi, coremanageris25lp);
auto firmwarekit = FirmwareKit(coreis25lp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto coremanageris25lp = CoreFlashManagerIS25LP016D(coreqspi);
auto coreis25lp = CoreFlashIS25LP016D(coreqspi, coremanageris25lp);
auto firmwarekit = FirmwareKit(coreis25lp);
auto coreflashmanager = CoreFlashManagerIS25LP016D(coreqspi);
auto coreflash = CoreFlashIS25LP016D(coreqspi, coremanageris25lp);
auto firmwarekit = FirmwareKit(coreflash);

mais ça fait bizarre d'avoir le manager de la flash qui est passé en argument pour la flash, j'aurais fait l'inverse.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faudrait revoir nos discussions pour voir ce qui avait motivé à implémenter le Manager dans la Memory et non l'inverse

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je fais un task, c'est pas urgent et si ça se trouve c'est juste une problème de naming. ;)

@YannLocatelli YannLocatelli force-pushed the yann/feature/os/perform-update branch 2 times, most recently from 2767983 to 58205e7 Compare March 16, 2022 11:11
@ladislas ladislas force-pushed the yann/feature/os/perform-update branch from 58205e7 to e818055 Compare March 16, 2022 11:16
@ladislas ladislas merged commit 40ebceb into develop Mar 16, 2022
@sonarcloud
Copy link

sonarcloud bot commented Mar 16, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@ladislas ladislas deleted the yann/feature/os/perform-update branch March 16, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants