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

m_boot_count was uint16 should be uint32 and comments #310

Merged
merged 6 commits into from
Dec 2, 2021

Conversation

DG12
Copy link
Contributor

@DG12 DG12 commented Dec 2, 2021

Only functional change is correction of m_boot_count from uint16 to uint32 and corresponding sizeof(m_boot_count) NOT sizeof(uint32).
Fortunately the loader added fill bytes after m_boot_count otherwise read_boot_count rt_flash_load would have clobbered memory after m_boot_count.
WAS

 .bss.m_boot_count
                0x0000000020003840        0x2 _build/nrf52832_xxaa/app_log.c.o
 *fill*         0x0000000020003842        0x6

Change log message for store_block: to use %X not %d
Use TESTABLE_STATIC
MInor LOG changes
Add many comments

Checked astyle , build and executed.

DG12 added 4 commits November 8, 2021 23:19
Already deleted from master
Only functional change it correction of m_boot_count from uint16 to uint32 and corresponding sizeof(m_boot_count) NOT sizeof(uint32).
Fortunately the loader added fill bytes after m_boot_count otherwise read_boot_count rt_flash_load would have clobbered memory after m_boot_count.
WAS .bss.m_boot_count
                0x0000000020003840        0x2 _build/nrf52832_xxaa/app_log.c.o
 *fill*         0x0000000020003842        0x6

Change log message to use X not d
Use TESTABLE_STATIC
Add many comments

Checked astyle , build and executed.
@ojousima-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@ojousima
Copy link
Member

ojousima commented Dec 2, 2021

ok to test

@ojousima
Copy link
Member

ojousima commented Dec 2, 2021

What is the purpose of
// // // // // // / // // // // // // // // // // comment lines?

@ojousima
Copy link
Member

ojousima commented Dec 2, 2021

Only functional change is correction of m_boot_count from uint16 to uint32 and corresponding sizeof(m_boot_count) NOT sizeof(uint32).

Good catch, thanks

@ojousima
Copy link
Member

ojousima commented Dec 2, 2021

Sonar error is caused by external origin, it can be ignored here

@ojousima ojousima merged commit 407c26a into ruuvi:master Dec 2, 2021
@DG12
Copy link
Contributor Author

DG12 commented Dec 2, 2021

Comment lines like:

// // // // // // /           // // // // // // // // // //
static rd_status_t store_block (const app_log_record_t * const p_record)

Are for ease of picking out functions while scrolling though . notice spaces where name is

@DG12 DG12 deleted the app_log_reformat branch December 2, 2021 13:30
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.

3 participants