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

Flash Memory - Spike #340

Merged
merged 8 commits into from
Oct 2, 2021
Merged

Conversation

YannLocatelli
Copy link
Member

Use #339

@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #340 (df40f06) into develop (b27e8e7) will not change coverage.
The diff coverage is 100.00%.

❗ Current head df40f06 differs from pull request most recent head f27b569. Consider uploading reports for the commit f27b569 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           develop      #340    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           55        62     +7     
  Lines          986      1092   +106     
==========================================
+ Hits           986      1092   +106     
Impacted Files Coverage Δ
...vers/CoreFlashMemory/include/CoreFlashIS25LP016D.h 100.00% <100.00%> (ø)
...reFlashMemory/include/CoreFlashManagerIS25LP016D.h 100.00% <100.00%> (ø)
...ers/CoreFlashMemory/source/CoreFlashIS25LP016D.cpp 100.00% <100.00%> (ø)
...eFlashMemory/source/CoreFlashManagerIS25LP016D.cpp 100.00% <100.00%> (ø)
include/interface/drivers/FlashManager.h 100.00% <100.00%> (ø)
include/interface/drivers/FlashMemory.h 100.00% <100.00%> (ø)
include/cxxsupport/lstd_span 100.00% <0.00%> (ø)
include/cxxsupport/lstd_array 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7ad171...f27b569. Read the comment docs.

@YannLocatelli YannLocatelli force-pushed the yann/feature/spike-coreflashmemory branch 2 times, most recently from 3dcd778 to eab36f7 Compare September 21, 2021 14:08
@YannLocatelli YannLocatelli force-pushed the yann/feature/spike-qspi branch 4 times, most recently from 8838a3a to 03585ba Compare September 24, 2021 10:44
@YannLocatelli YannLocatelli force-pushed the yann/feature/spike-coreflashmemory branch from eab36f7 to b870e94 Compare September 24, 2021 13:53
@YannLocatelli YannLocatelli changed the base branch from yann/feature/spike-qspi to develop September 24, 2021 13:54
@YannLocatelli YannLocatelli force-pushed the yann/feature/spike-coreflashmemory branch 4 times, most recently from 4f125c3 to d4c020d Compare September 25, 2021 10:45
@YannLocatelli YannLocatelli force-pushed the yann/feature/spike-coreflashmemory branch 4 times, most recently from 0092866 to 30ebd5c Compare September 29, 2021 15:10
@YannLocatelli YannLocatelli marked this pull request as ready for review September 29, 2021 15:11
@YannLocatelli YannLocatelli force-pushed the yann/feature/spike-coreflashmemory branch 2 times, most recently from 3fad967 to ccffca4 Compare October 1, 2021 07:55
@YannLocatelli
Copy link
Member Author

Update

  • Class diagram [Link]
  • Workflow diagram [Link]

Comment on lines 94 to 98
waitForChipAvailable();
if (chipIsNotAvailable()) {
return;
}
_qspi.sendCommand(command::erase_chip, -1, tx_buffer, 0, rx_buffer, 0);
Copy link
Member Author

Choose a reason for hiding this comment

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

En refaisant le diagramme, il y a beaucoup de pattern similaire (4)

  1. Attendre que la chip est disponible
  2. Vérifier si il est disponible
  3. Si disponible, Envoyer la commande simple (sans écriture ni lecture attendue)

On peut donc faire une méthode privée du style

void CoreFlashManagerIS25LP016D::sendSimpleCommand(uint8_t command){
	waitForChipAvailable();
	if (chipIsNotAvailable()) {
		return;
	}
	_qspi.sendCommand(command, -1, tx_buffer, 0, rx_buffer, 0);
}

@YannLocatelli YannLocatelli force-pushed the yann/feature/spike-coreflashmemory branch 2 times, most recently from df40f06 to e5fb735 Compare October 1, 2021 15:31
Implementation of the specific external flash memory used on robot
FlashManager handle operations between MCU and flash by
reading/writing/sending commands to flash registers

:children_crossing: (is25lp): Simplify and using flash::is25lp as namespace

:art: (is25lp): Seperate enableWrite and writeIsNotEnabled

:recycle: (is25lp): Add sendSimpleCommand
For commands without writing or reading in registers
@ladislas ladislas force-pushed the yann/feature/spike-coreflashmemory branch from e5fb735 to f27b569 Compare October 2, 2021 19:24
@sonarcloud
Copy link

sonarcloud bot commented Oct 2, 2021

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 4 Code Smells

89.9% 89.9% Coverage
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented Oct 2, 2021

.map & .bin files analysis report

Versions 🔖

Summary 📝

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Static RAM (base/head) Static RAM Δ Total Flash (base/head) Total Flash Δ
LekaOS ✔️ 12736 / 12736 ø 78324 / 78324 ø
certs_emc_ble_bt_lcd_led_motors ✔️ 30496 / 30496 ø 229264 / 229264 ø
certs_emc_ble_led_motors ✔️ 25400 / 25400 ø 181812 / 181812 ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 23152 / 23152 ø 148956 / 148956 ø
certs_emc_lcd_led_motors ✔️ 15880 / 15880 ø 85080 / 85080 ø
hardware_motors_test_reduction_and_wheels ✔️ 24808 / 24808 ø 177900 / 177900 ø
spike_lk_ble ✔️ 24112 / 24112 ø 175404 / 175404 ø
spike_lk_bluetooth ✔️ 12736 / 12736 ø 81332 / 81332 ø
spike_lk_cg_animations ✔️ 25728 / 25728 ø 135120 / 135120 ø
spike_lk_file_manager ✔️ 15176 / 15176 ø 117180 / 117180 ø
spike_lk_flash_memory - - 12776 - 83124 -
spike_lk_lcd ✔️ 25352 / 25352 ø 131480 / 131480 ø
spike_lk_led ✔️ 14656 / 14656 ø 83572 / 83572 ø
spike_lk_log_kit ✔️ 12928 / 12928 ø 80564 / 80564 ø
spike_lk_motors ✔️ 12816 / 12816 ø 81460 / 81460 ø
spike_lk_qspi ✔️ 12776 / 12776 ø 81908 / 81908 ø
spike_lk_rfid ✔️ 12736 / 12736 ø 81076 / 81076 ø
spike_lk_sensors_battery ✔️ 15392 / 15392 ø 119624 / 119624 ø
spike_lk_sensors_light ✔️ 12776 / 12776 ø 80116 / 80116 ø
spike_lk_sensors_microphone ✔️ 12776 / 12776 ø 80308 / 80308 ø
spike_lk_sensors_temperature_humidity ✔️ 12760 / 12760 ø 86388 / 86388 ø
spike_lk_sensors_touch ✔️ 12888 / 12888 ø 88436 / 88436 ø
spike_lk_wifi ✔️ 16096 / 16096 ø 125660 / 125660 ø
spike_mbed_blinky ✔️ 11120 / 11120 ø 54736 / 54736 ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 12840 / 12840 ø 78388 / 78388 ø
spike_stl_cxxsupport ✔️ 12800 / 12800 ø 79796 / 79796 ø

Map files diff output 🗺️

Click to show diff list
spike_lk_flash_memory (click to expand)
| Module                  |         .text |       .data |        .bss |
|-------------------------|---------------|-------------|-------------|
| [fill]                  |     160(+160) |       8(+8) |     20(+20) |
| [lib]/CoreFlashMemory.a |     682(+682) |       0(+0) |       0(+0) |
| [lib]/CoreQSPI.a        |     276(+276) |       0(+0) |       0(+0) |
| [lib]/HelloWorld.a      |       94(+94) |       0(+0) |       0(+0) |
| [lib]/LogKit.a          |     658(+658) |       0(+0) |     64(+64) |
| [lib]/c.a               | 33296(+33296) | 2472(+2472) |     58(+58) |
| [lib]/gcc.a             |   7148(+7148) |       0(+0) |       0(+0) |
| [lib]/m.a               |     360(+360) |       0(+0) |       0(+0) |
| [lib]/mbed-os-static.a  | 30950(+30950) |   444(+444) | 8178(+8178) |
| [lib]/misc              |     188(+188) |       4(+4) |     28(+28) |
| [lib]/nosys.a           |       32(+32) |       0(+0) |       0(+0) |
| [lib]/stdc++.a          |   5336(+5336) |       8(+8) |     44(+44) |
| main.cpp.obj            |   1000(+1000) |       8(+8) | 1440(+1440) |
| Subtotals               | 80180(+80180) | 2944(+2944) | 9832(+9832) |
Total Static RAM memory (data + bss): 12776(+12776) bytes
Total Flash memory (text + data): 83124(+83124) bytes

@ladislas ladislas merged commit 0600f8c into develop Oct 2, 2021
@ladislas ladislas deleted the yann/feature/spike-coreflashmemory branch October 8, 2021 21:29
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