-
Notifications
You must be signed in to change notification settings - Fork 3k
Replace CMSIS flash driver by SDK flash driver #4066
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
Replace CMSIS flash driver by SDK flash driver #4066
Conversation
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, address, (uint64_t)*data) != HAL_OK) { | ||
return -1; | ||
} else { | ||
size--; address++;data++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please one line at the time, split these to separate lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will do
{ | ||
uint32_t sector = 0; | ||
|
||
if((address < ADDR_FLASH_SECTOR_1) && (address >= ADDR_FLASH_SECTOR_0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting:
if (cond) {
} else {
}
This functionality is not in the SDK driver ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately not. I will rewrite this function
GetSector has been rewritten
tmp = address - ADDR_FLASH_SECTOR_12; | ||
} | ||
if (address < ADDR_FLASH_SECTOR_4) { // 16k sectorsize | ||
//printf("tmp for sectors less than 4: 0X%4x") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall this printf line be removed (dead code) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it in the 2nd commit. I guess we've worked in //
:)
} else { | ||
sector += 4 + (tmp >>17); | ||
} | ||
printf("address:0X%04x%04x, secteur: %d\n", (address>>16)&0XFFFF, (address&0XFFFF), sector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this should not print always?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment. It's been removed in commitid= 09229
} else { | ||
sector += 4 + (tmp >>17); | ||
} | ||
printf("address:0X%04x%04x, secteur: %d\n", (address>>16)&0XFFFF, (address&0XFFFF), sector); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here are still some printf , line 162 also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for that ! my eyes are not working properly today :)
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
Hi, |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
retest uvisor |
Yes, we will integrate it to master |
Description
Replace CMSIS flash driver by SDK flash drive
Status