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

mmyster/feature/file system kit/error #537

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

MMyster
Copy link
Contributor

@MMyster MMyster commented Mar 8, 2022

  • ✨ (file_system_kit): Add 'err' function
  • ✨ (file_system_kit): Add 'clearerr' function

@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #537 (9c5e21d) into develop (916b88e) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##           develop      #537   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         1594      1602    +8     
=========================================
+ Hits          1594      1602    +8     
Impacted Files Coverage Δ
include/interface/platform/File.h 100.00% <ø> (ø)
libs/FileSystemKit/include/FileSystemKit.h 100.00% <ø> (ø)
libs/FileSystemKit/source/File.cpp 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 8, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 138964 (53%) 123180 (46%) 29360 (5%)
os 183784 (11%) 1380888 (88%) 29528 (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 ✔️ 183784 (8%) ø 29528 (5%) ø
bootloader ✔️ 138756 (6%)
138964 (6%)
📈
208 (0%)
29360 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 257976 (12%)
258168 (12%)
📈
192 (0%)
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 ✔️ 182664 (8%) ø 29456 (5%) ø
spike_lk_bluetooth ✔️ 91192 (4%) ø 17472 (3%) ø
spike_lk_cg_animations ✔️ 149384 (7%) ø 30464 (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 ✔️ 331420 (15%)
331612 (15%)
📈
192 (0%)
33536 (6%) ø
spike_lk_filesystem_kit ✔️ 127388 (6%)
127580 (6%)
📈
192 (0%)
20216 (3%) ø
spike_lk_flash_memory ✔️ 87352 (4%) ø 17512 (3%) ø
spike_lk_lcd ✔️ 149792 (7%) ø 30096 (5%) ø
spike_lk_led ✔️ 88808 (4%) ø 19400 (3%) ø
spike_lk_led_kit ✔️ 109636 (5%) ø 20648 (3%) ø
spike_lk_log_kit ✔️ 92000 (4%) ø 18168 (3%) ø
spike_lk_motors ✔️ 86576 (4%) ø 17552 (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_ticker_timeout ✔️ 83224 (3%) ø 17592 (3%) ø
spike_lk_update_process_app_base ✔️ 144932 (6%)
145204 (6%)
📈
272 (0%)
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
bootloader (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/bootloader-map.txt	2022-03-11 14:38:42.226807373 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/bootloader-map.txt	2022-03-11 14:38:42.458809917 +0000
@@ -1,19 +1,19 @@
 | Module                 |           .text |       .data |          .bss |
 |------------------------|-----------------|-------------|---------------|
-| [fill]                 |       186(+186) |       0(+0) |       32(+32) |
+| [fill]                 |       174(+174) |       0(+0) |       32(+32) |
 | [lib]/CoreBattery.a    |       472(+472) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a  |       666(+666) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a  |       694(+694) |       0(+0) |         0(+0) |
 | [lib]/bootutil.a       |     5898(+5898) |     16(+16) | 13816(+13816) |
-| [lib]/c.a              |   42184(+42184) | 2572(+2572) |       97(+97) |
+| [lib]/c.a              |   42360(+42360) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a            |     3276(+3276) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a |   72164(+72164) |   528(+528) | 10919(+10919) |
 | [lib]/misc             |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a          |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a         |           0(+0) |       0(+0) |         0(+0) |
 | default_bd.cpp.obj     |       242(+242) |       0(+0) |     568(+568) |
 | main.cpp.obj           |       664(+664) |       0(+0) |     492(+492) |
 | signing_keys.c.obj     |           0(+0) |       0(+0) |         0(+0) |
-| Subtotals              | 125972(+125972) | 3120(+3120) | 25952(+25952) |
+| Subtotals              | 126164(+126164) | 3120(+3120) | 25952(+25952) |
 Total Static RAM memory (data + bss): 29072(+29072) bytes
-Total Flash memory (text + data): 129092(+129092) bytes
+Total Flash memory (text + data): 129284(+129284) bytes
 
Flash used: 138964&nbsp;(6%) / total: 2097152
SRAM used: 29360&nbsp;(5%) / total: 524288
certs_emc_ble_bt_lcd_led_motors (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/certs_emc_ble_bt_lcd_led_motors-map.txt	2022-03-11 14:38:42.842814126 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/certs_emc_ble_bt_lcd_led_motors-map.txt	2022-03-11 14:38:43.166817678 +0000
@@ -1,25 +1,25 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       448(+448) |     11(+11) |       88(+88) |
+| [fill]                  |       436(+436) |     11(+11) |       88(+88) |
 | [lib]/CoreMotor.a       |       130(+130) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a         |         56(+56) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a   |       710(+710) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a   |       738(+738) |       0(+0) |         0(+0) |
 | [lib]/_LekaBluetooth.a  |       698(+698) |       0(+0) |         0(+0) |
 | [lib]/_LekaRFID.a       |       600(+600) |       0(+0) |         0(+0) |
 | [lib]/_LekaScreen.a     |     3166(+3166) |       0(+0) |     240(+240) |
 | [lib]/_LekaTouch.a      |     1254(+1254) |       0(+0) |       64(+64) |
 | [lib]/_PrettyPrinter.a  |     1612(+1612) |       0(+0) |       64(+64) |
-| [lib]/c.a               |   48400(+48400) | 2572(+2572) |       97(+97) |
+| [lib]/c.a               |   48576(+48576) | 2572(+2572) |       97(+97) |
 | [lib]/driver_FastLED.a  |     1022(+1022) |       2(+2) |       36(+36) |
 | [lib]/gcc.a             |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a               |       360(+360) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  | 155058(+155058) |   706(+706) | 19519(+19519) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |     5864(+5864) |       8(+8) |       44(+44) |
 | main.cpp.obj            |     7178(+7178) |       9(+9) | 11476(+11476) |
-| Subtotals               | 233932(+233932) | 3312(+3312) | 31656(+31656) |
+| Subtotals               | 234124(+234124) | 3312(+3312) | 31656(+31656) |
 Total Static RAM memory (data + bss): 34968(+34968) bytes
-Total Flash memory (text + data): 237244(+237244) bytes
+Total Flash memory (text + data): 237436(+237436) bytes
 
Flash used: 258168&nbsp;(12%) / total: 2097152
SRAM used: 35272&nbsp;(6%) / total: 524288
spike_lk_file_reception (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_file_reception-map.txt	2022-03-11 14:38:48.966875031 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_file_reception-map.txt	2022-03-11 14:38:49.258877885 +0000
@@ -1,21 +1,21 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       330(+330) |     16(+16) |       44(+44) |
+| [fill]                  |       318(+318) |     16(+16) |       44(+44) |
 | [lib]/CoreWifi.a        |     4598(+4598) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a   |       666(+666) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a   |       694(+694) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/WebKit.a          |     1208(+1208) |       0(+0) |         0(+0) |
-| [lib]/c.a               |   55144(+55144) | 2574(+2574) |       97(+97) |
+| [lib]/c.a               |   55320(+55320) | 2574(+2574) |       97(+97) |
 | [lib]/gcc.a             |     7416(+7416) |       0(+0) |         0(+0) |
 | [lib]/m.a               |       372(+372) |       0(+0) |         0(+0) |
 | [lib]/mbed-http.a       |     6896(+6896) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  | 186060(+186060) |   614(+614) | 13639(+13639) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |     5908(+5908) |       8(+8) |       44(+44) |
 | main.cpp.obj            |     3808(+3808) |       0(+0) | 16180(+16180) |
-| Subtotals               | 272728(+272728) | 3216(+3216) | 30032(+30032) |
+| Subtotals               | 272920(+272920) | 3216(+3216) | 30032(+30032) |
 Total Static RAM memory (data + bss): 33248(+33248) bytes
-Total Flash memory (text + data): 275944(+275944) bytes
+Total Flash memory (text + data): 276136(+276136) bytes
 
Flash used: 331612&nbsp;(15%) / total: 2097152
SRAM used: 33536&nbsp;(6%) / total: 524288
spike_lk_filesystem_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_filesystem_kit-map.txt	2022-03-11 14:38:49.550880740 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_filesystem_kit-map.txt	2022-03-11 14:38:49.798883165 +0000
@@ -1,18 +1,18 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       196(+196) |       7(+7) |       34(+34) |
+| [fill]                  |       184(+184) |       7(+7) |       34(+34) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a   |       666(+666) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a   |       694(+694) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/c.a               |   40788(+40788) | 2572(+2572) |       97(+97) |
+| [lib]/c.a               |   40964(+40964) | 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  |   54818(+54818) |   460(+460) | 10229(+10229) |
 | [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            |     4426(+4426) |     37(+37) |   6408(+6408) |
-| Subtotals               | 114148(+114148) | 3088(+3088) | 16840(+16840) |
+| Subtotals               | 114340(+114340) | 3088(+3088) | 16840(+16840) |
 Total Static RAM memory (data + bss): 19928(+19928) bytes
-Total Flash memory (text + data): 117236(+117236) bytes
+Total Flash memory (text + data): 117428(+117428) bytes
 
Flash used: 127580&nbsp;(6%) / total: 2097152
SRAM used: 20216&nbsp;(3%) / total: 524288
spike_lk_update_process_app_base (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_update_process_app_base-map.txt	2022-03-11 14:38:56.458942240 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_update_process_app_base-map.txt	2022-03-11 14:38:56.698944280 +0000
@@ -1,22 +1,22 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       188(+188) |       0(+0) |       38(+38) |
+| [fill]                  |       240(+240) |       0(+0) |       38(+38) |
 | [lib]/CoreFlashMemory.a |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a        |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a   |       710(+710) |       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               |   42048(+42048) | 2572(+2572) |       97(+97) |
+| [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  |   68778(+68778) |   524(+524) | 10385(+10385) |
 | [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            |     3334(+3334) |       0(+0) |   7212(+7212) |
-| Subtotals               | 130472(+130472) | 3120(+3120) | 17936(+17936) |
+| Subtotals               | 130728(+130728) | 3120(+3120) | 17936(+17936) |
 Total Static RAM memory (data + bss): 21056(+21056) bytes
-Total Flash memory (text + data): 133592(+133592) bytes
+Total Flash memory (text + data): 133848(+133848) bytes
 
Flash used: 145204&nbsp;(6%) / total: 2097152
SRAM used: 21352&nbsp;(4%) / total: 524288

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 138964 (53%) 123180 (46%) 29360 (5%)
os 174340 (11%) 1390332 (88%) 23512 (4%)
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 ✔️ 174340 (8%) ø 23512 (4%) ø
bootloader ✔️ 138756 (6%)
138964 (6%)
📈
208 (0%)
29360 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 250416 (11%)
250624 (11%)
📈
208 (0%)
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 ✔️ 173380 (8%) ø 23504 (4%) ø
spike_lk_bluetooth ✔️ 73256 (3%) ø 11448 (2%) ø
spike_lk_cg_animations ✔️ 141112 (6%) ø 24464 (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 ✔️ 326712 (15%)
326904 (15%)
📈
192 (0%)
27576 (5%) ø
spike_lk_filesystem_kit ✔️ 103268 (4%)
103476 (4%)
📈
208 (0%)
14048 (2%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_lcd ✔️ 136976 (6%) ø 24024 (4%) ø
spike_lk_led ✔️ 65744 (3%) ø 13392 (2%) ø
spike_lk_led_kit ✔️ 100428 (4%) ø 14640 (2%) ø
spike_lk_log_kit ✔️ 68528 (3%) ø 11912 (2%) ø
spike_lk_motors ✔️ 62528 (2%) ø 11488 (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_ticker_timeout ✔️ 69052 (3%) ø 11632 (2%) ø
spike_lk_update_process_app_base ✔️ 122516 (5%)
122724 (5%)
📈
208 (0%)
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
bootloader (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/bootloader-map.txt	2022-03-11 14:38:32.792708585 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/bootloader-map.txt	2022-03-11 14:38:32.976719318 +0000
@@ -1,19 +1,19 @@
 | Module                 |           .text |       .data |          .bss |
 |------------------------|-----------------|-------------|---------------|
-| [fill]                 |       186(+186) |       0(+0) |       32(+32) |
+| [fill]                 |       174(+174) |       0(+0) |       32(+32) |
 | [lib]/CoreBattery.a    |       472(+472) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a  |       666(+666) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a  |       694(+694) |       0(+0) |         0(+0) |
 | [lib]/bootutil.a       |     5898(+5898) |     16(+16) | 13816(+13816) |
-| [lib]/c.a              |   42184(+42184) | 2572(+2572) |       97(+97) |
+| [lib]/c.a              |   42360(+42360) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a            |     3276(+3276) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a |   72164(+72164) |   528(+528) | 10919(+10919) |
 | [lib]/misc             |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a          |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a         |           0(+0) |       0(+0) |         0(+0) |
 | default_bd.cpp.obj     |       242(+242) |       0(+0) |     568(+568) |
 | main.cpp.obj           |       664(+664) |       0(+0) |     492(+492) |
 | signing_keys.c.obj     |           0(+0) |       0(+0) |         0(+0) |
-| Subtotals              | 125972(+125972) | 3120(+3120) | 25952(+25952) |
+| Subtotals              | 126164(+126164) | 3120(+3120) | 25952(+25952) |
 Total Static RAM memory (data + bss): 29072(+29072) bytes
-Total Flash memory (text + data): 129092(+129092) bytes
+Total Flash memory (text + data): 129284(+129284) bytes
 
Flash used: 138964&nbsp;(6%) / total: 2097152
SRAM used: 29360&nbsp;(5%) / total: 524288
certs_emc_ble_bt_lcd_led_motors (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/certs_emc_ble_bt_lcd_led_motors-map.txt	2022-03-11 14:38:33.288737519 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/certs_emc_ble_bt_lcd_led_motors-map.txt	2022-03-11 14:38:33.556753152 +0000
@@ -1,23 +1,23 @@
 | Module                 |           .text |       .data |          .bss |
 |------------------------|-----------------|-------------|---------------|
-| [fill]                 |       436(+436) |     11(+11) |       88(+88) |
+| [fill]                 |       424(+424) |     11(+11) |       88(+88) |
 | [lib]/CoreMotor.a      |       130(+130) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a        |         56(+56) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a  |       710(+710) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a  |       738(+738) |       0(+0) |         0(+0) |
 | [lib]/_LekaBluetooth.a |       698(+698) |       0(+0) |         0(+0) |
 | [lib]/_LekaRFID.a      |       600(+600) |       0(+0) |         0(+0) |
 | [lib]/_LekaScreen.a    |     3166(+3166) |       0(+0) |     240(+240) |
 | [lib]/_LekaTouch.a     |       668(+668) |       0(+0) |         0(+0) |
 | [lib]/_PrettyPrinter.a |         38(+38) |       0(+0) |         0(+0) |
-| [lib]/c.a              |   48512(+48512) | 2572(+2572) |       97(+97) |
+| [lib]/c.a              |   48688(+48688) | 2572(+2572) |       97(+97) |
 | [lib]/driver_FastLED.a |     1022(+1022) |       2(+2) |       36(+36) |
 | [lib]/gcc.a            |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a | 155058(+155058) |   706(+706) | 19519(+19519) |
 | [lib]/misc             |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a          |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a         |     5356(+5356) |       8(+8) |       44(+44) |
 | main.cpp.obj           |     4978(+4978) |       9(+9) |   5580(+5580) |
-| Subtotals              | 228796(+228796) | 3312(+3312) | 25632(+25632) |
+| Subtotals              | 228988(+228988) | 3312(+3312) | 25632(+25632) |
 Total Static RAM memory (data + bss): 28944(+28944) bytes
-Total Flash memory (text + data): 232108(+232108) bytes
+Total Flash memory (text + data): 232300(+232300) bytes
 
Flash used: 250624&nbsp;(11%) / total: 2097152
SRAM used: 29240&nbsp;(5%) / total: 524288
spike_lk_file_reception (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_file_reception-map.txt	2022-03-11 14:38:38.157021493 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_file_reception-map.txt	2022-03-11 14:38:38.409036193 +0000
@@ -1,19 +1,19 @@
 | Module                 |           .text |       .data |          .bss |
 |------------------------|-----------------|-------------|---------------|
-| [fill]                 |       350(+350) |     16(+16) |       44(+44) |
+| [fill]                 |       338(+338) |     16(+16) |       44(+44) |
 | [lib]/CoreWifi.a       |     4598(+4598) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a  |       666(+666) |       0(+0) |         0(+0) |
+| [lib]/FileSystemKit.a  |       694(+694) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a     |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/WebKit.a         |     1208(+1208) |       0(+0) |         0(+0) |
-| [lib]/c.a              |   55268(+55268) | 2574(+2574) |       97(+97) |
+| [lib]/c.a              |   55444(+55444) | 2574(+2574) |       97(+97) |
 | [lib]/gcc.a            |     7416(+7416) |       0(+0) |         0(+0) |
 | [lib]/mbed-http.a      |     6896(+6896) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a | 186092(+186092) |   614(+614) | 13639(+13639) |
 | [lib]/misc             |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a          |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a         |     5332(+5332) |       8(+8) |       44(+44) |
 | main.cpp.obj           |     1320(+1320) |       0(+0) | 10220(+10220) |
-| Subtotals              | 269460(+269460) | 3216(+3216) | 24072(+24072) |
+| Subtotals              | 269652(+269652) | 3216(+3216) | 24072(+24072) |
 Total Static RAM memory (data + bss): 27288(+27288) bytes
-Total Flash memory (text + data): 272676(+272676) bytes
+Total Flash memory (text + data): 272868(+272868) bytes
 
Flash used: 326904&nbsp;(15%) / total: 2097152
SRAM used: 27576&nbsp;(5%) / total: 524288
spike_lk_filesystem_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_filesystem_kit-map.txt	2022-03-11 14:38:38.633049260 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_filesystem_kit-map.txt	2022-03-11 14:38:38.801059061 +0000
@@ -1,15 +1,15 @@
 | Module                 |         .text |       .data |          .bss |
 |------------------------|---------------|-------------|---------------|
-| [fill]                 |     154(+154) |       7(+7) |       42(+42) |
-| [lib]/FileSystemKit.a  |     666(+666) |       0(+0) |         0(+0) |
+| [fill]                 |     142(+142) |       7(+7) |       42(+42) |
+| [lib]/FileSystemKit.a  |     694(+694) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a     |       94(+94) |       0(+0) |         0(+0) |
-| [lib]/c.a              | 40764(+40764) | 2572(+2572) |       97(+97) |
+| [lib]/c.a              | 40940(+40940) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a            |   3276(+3276) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a | 47454(+47454) |   460(+460) | 10193(+10193) |
 | [lib]/misc             |     188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a          |       32(+32) |       0(+0) |         0(+0) |
 | main.cpp.obj           |     636(+636) |     37(+37) |     320(+320) |
-| Subtotals              | 93264(+93264) | 3080(+3080) | 10680(+10680) |
+| Subtotals              | 93456(+93456) | 3080(+3080) | 10680(+10680) |
 Total Static RAM memory (data + bss): 13760(+13760) bytes
-Total Flash memory (text + data): 96344(+96344) bytes
+Total Flash memory (text + data): 96536(+96536) bytes
 
Flash used: 103476&nbsp;(4%) / total: 2097152
SRAM used: 14048&nbsp;(2%) / total: 524288
spike_lk_update_process_app_base (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_update_process_app_base-map.txt	2022-03-11 14:38:43.693341841 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_update_process_app_base-map.txt	2022-03-11 14:38:43.861351535 +0000
@@ -1,20 +1,20 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       196(+196) |       0(+0) |       38(+38) |
+| [fill]                  |       184(+184) |       0(+0) |       38(+38) |
 | [lib]/CoreFlashMemory.a |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a        |       160(+160) |       0(+0) |         0(+0) |
-| [lib]/FileSystemKit.a   |       710(+710) |       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               |   42160(+42160) | 2572(+2572) |       97(+97) |
+| [lib]/c.a               |   42336(+42336) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     3276(+3276) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   61310(+61310) |   524(+524) | 10341(+10341) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |           0(+0) |       0(+0) |         0(+0) |
 | main.cpp.obj            |       998(+998) |       0(+0) |   1252(+1252) |
-| Subtotals               | 111124(+111124) | 3112(+3112) | 11888(+11888) |
+| Subtotals               | 111316(+111316) | 3112(+3112) | 11888(+11888) |
 Total Static RAM memory (data + bss): 15000(+15000) bytes
-Total Flash memory (text + data): 114236(+114236) bytes
+Total Flash memory (text + data): 114428(+114428) bytes
 
Flash used: 122724&nbsp;(5%) / total: 2097152
SRAM used: 15288&nbsp;(2%) / total: 524288

@MMyster MMyster force-pushed the mmyster/feature/file_system_kit/error branch from 5db743c to 74ef65d Compare March 8, 2022 15:23
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

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

Je connaissais pas std::ferror, c'est cool

peut être utiliser error plutôt que err

je comprends pas aussi pourquoi le contenu que tu écris il génère une erreur dans le fichier?

return false;
}

return std::ferror(_file.get());
Copy link
Member

Choose a reason for hiding this comment

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

là tu as un implicite cast de int vers bool. peut être qu'il faut être explicite avec un static_cast

Copy link
Contributor Author

Choose a reason for hiding this comment

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

En effet, je corrigerai ça

{
auto input_data = std::to_array<uint8_t>({0x61, 0x62, 0x63, 0x64, 0x65, 0x66}); // "abcdef"

file.open(tempFilename, "r");
Copy link
Member

Choose a reason for hiding this comment

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

le test s'appelle errorWriting et là tu read, peut être mettre dans un autre test errorReading

Copy link
Contributor Author

Choose a reason for hiding this comment

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

En fait, je teste la fonction 'write' en mode 'r' et 'w'


file.write(input_data);

auto error = file.err();
Copy link
Member

Choose a reason for hiding this comment

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

pourquoi y a une erreur là?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ouverture en mode 'read' donc écriture impossible


file.write(input_data);

auto error = file.err();
Copy link
Member

Choose a reason for hiding this comment

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

pourquoi y a une erreur là?


file.write(input_data);

auto error = file.err();
Copy link
Member

Choose a reason for hiding this comment

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

pourquoi y a une erreur là?

@MMyster MMyster force-pushed the mmyster/feature/file_system_kit/error branch 3 times, most recently from 655cf51 to b98fdaa Compare March 11, 2022 11:59
@MMyster MMyster force-pushed the mmyster/feature/file_system_kit/error branch from b98fdaa to 9c5e21d Compare March 11, 2022 14:30
@ladislas ladislas merged commit ba76e76 into develop Mar 11, 2022
@ladislas ladislas deleted the mmyster/feature/file_system_kit/error branch March 11, 2022 14:34
@sonarcloud
Copy link

sonarcloud bot commented Mar 11, 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

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