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

firmware/sys/storage: Added supports to del registers and rwp bit set #361

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

eduazocar
Copy link
Collaborator

Contribution description

This Pr includes support to delete a register from mtd, then that register is erased, it's moved all them registers, compressing the data pointed, and the data inside of register. (Delete process creates a copy of the mtd_register indexes and content dynamically). Another new feature is setting a bit read/write protection, for each method used. Also mtd_dumpin debugger mode adds the address number, the mtd_available_idxwas changed to receive two parameters *idx and *count. where the pointer idx should returns the last available address, and the count pointer receives the number of empty registers.

Testing procedure

use the test of storage module, and using kconfig parameters, set in debug mode. Select Debug for Test application and the module.

make -C tests/system_storage/ menuconfig flash term

You need to check using the mtd_dumpto check the memory block in mtd.

Expected results

Before

0x8066E00 :1C 00 4B 45 59 30 00 46 61 69 6C 65 64 20 53 61 #index 0
0x8066E10 :76 69 6E 67 20 64 61 74 61 00 4B 00 00 70 06 08 
0x8066E20 :14 00 4B 45 59 31 00 4B 45 59 32 00 4B 45 59 33 # index 1
0x8066E30 :00 4B 45 59 34 00 4B 45 59 35 00 00 1C 70 06 08 
0x8066E40 :01 00 4B 45 59 32 00 4B 45 59 33 00 4B 45 59 34 #index 2
0x8066E50 :00 4B 45 59 35 00 4B 45 59 36 00 00 30 70 06 08 
0x8066E60 :02 00 4B 45 59 33 00 4B 45 59 34 00 4B 45 59 35 #index 3
0x8066E70 :00 4B 45 59 36 00 4B 45 59 37 00 00 31 70 06 08 
0x8066E80 :04 00 4B 45 59 34 00 4B 45 59 35 00 4B 45 59 36 #index 4
0x8066E90 :00 4B 45 59 37 00 00 00 43 61 6E 00 33 70 06 08 
0x8066EA0 :01 00 4B 45 59 35 00 4B 45 59 36 00 4B 45 59 37 # index 5
0x8066EB0 :00 00 00 43 61 6E 6E 6F 74 20 64 00 37 70 06 08 
0x8066EC0 :02 00 4B 45 59 36 00 4B 45 59 37 00 00 00 43 61 
0x8066ED0 :6E 6E 6F 74 20 64 65 62 75 67 2C 00 38 70 06 08 
0x8066EE0 :04 00 4B 45 59 37 00 00 00 43 61 6E 6E 6F 74 20 
0x8066EF0 :64 65 62 75 67 2C 20 73 74 61 63 00 3A 70 06 08 

After

0x8066E00 :1C 00 4B 45 59 30 00 46 61 69 6C 65 64 20 53 61  #index 0
0x8066E10 :76 69 6E 67 20 64 61 74 61 00 4B 00 00 70 06 08 
0x8066E20 :14 00 4B 45 59 31 00 4B 45 59 32 00 4B 45 59 33  #index 1
0x8066E30 :00 4B 45 59 34 00 4B 45 59 35 00 00 1C 70 06 08 
0x8066E40 :02 00 4B 45 59 33 00 4B 45 59 34 00 4B 45 59 35  # index 3
0x8066E50 :00 4B 45 59 36 00 4B 45 59 37 00 00 30 70 06 08 
0x8066E60 :04 00 4B 45 59 34 00 4B 45 59 35 00 4B 45 59 36 # index 4
0x8066E70 :00 4B 45 59 37 00 00 00 43 61 6E 00 32 70 06 08 
0x8066E80 :01 00 4B 45 59 35 00 4B 45 59 36 00 4B 45 59 37 # index 5
0x8066E90 :00 00 00 43 61 6E 6E 6F 74 20 64 00 36 70 06 08 

Issues/PRs references

@eduazocar eduazocar added this to the 0.22.12 milestone Oct 12, 2022
@eduazocar eduazocar self-assigned this Oct 12, 2022
@eduazocar eduazocar added this to In Progress in Firmware via automation Oct 12, 2022
Copy link
Contributor

@luisan00 luisan00 left a comment

Choose a reason for hiding this comment

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

Good job! 👍 let's go ahead

@eduazocar eduazocar merged commit 1e2cce4 into Mesh4all:main Oct 12, 2022
Firmware automation moved this from In Progress to Done Oct 12, 2022
@eduazocar eduazocar deleted the feature/storage_regs branch October 12, 2022 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Firmware
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants