You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/02/08 13:57:47 UTC
[GitHub] [incubator-nuttx] zouboan opened a new pull request #5442: drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct m…
zouboan opened a new pull request #5442:
URL: https://github.com/apache/incubator-nuttx/pull/5442
…tdconfig_struct_s
## Summary
enlarge the limits of blocksize in struct mtdconfig_struct_s
## Impact
The least flash sector size of STM32F4 is 16kB, When mtdconfig used on stm32f4 MCU geo.blocksize in function mtdconfig_register is 0x4000 which is 15bit, and dev->blocksize = geo.blocksize will result dev->blocksize = 0, because dev->blocksize limit as 14bit.
## Testing
Tested on STM32F405RGT6 board.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] zouboan commented on pull request #5442: drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct m…
Posted by GitBox <gi...@apache.org>.
zouboan commented on pull request #5442:
URL: https://github.com/apache/incubator-nuttx/pull/5442#issuecomment-1032687349
is inconceivable,the change of drivers/mtd/mtd_config.c result the error build of
bl602evb/wifi,CONFIG_RISCV_TOOLCHAIN_GNU_RVGL under macOS (macos) !Infact, bl602evb/wifi doesn't define CONFIG_MTD_CONFIG
https://github.com/apache/incubator-nuttx/runs/5110246216?check_suite_focus=true
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #5442: drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct m…
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5442:
URL: https://github.com/apache/incubator-nuttx/pull/5442#issuecomment-1032690469
Look like fail to download the external package, I will restart ci for you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] zouboan commented on a change in pull request #5442: drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct m…
Posted by GitBox <gi...@apache.org>.
zouboan commented on a change in pull request #5442:
URL: https://github.com/apache/incubator-nuttx/pull/5442#discussion_r801722797
##########
File path: drivers/mtd/mtd_config.c
##########
@@ -77,7 +77,7 @@ struct mtdconfig_struct_s
{
FAR struct mtd_dev_s *mtd; /* Contained MTD interface */
sem_t exclsem; /* Supports mutual exclusion */
- uint32_t blocksize :14; /* Size of blocks in contained MTD */
+ uint32_t blocksize :18; /* Size of blocks in contained MTD */
uint32_t erasesize :18; /* Size of erase block in contained MTD */
Review comment:
ok,good idea!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5442: drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct m…
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5442:
URL: https://github.com/apache/incubator-nuttx/pull/5442
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5442: drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct m…
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5442:
URL: https://github.com/apache/incubator-nuttx/pull/5442#discussion_r801715947
##########
File path: drivers/mtd/mtd_config.c
##########
@@ -77,7 +77,7 @@ struct mtdconfig_struct_s
{
FAR struct mtd_dev_s *mtd; /* Contained MTD interface */
sem_t exclsem; /* Supports mutual exclusion */
- uint32_t blocksize :14; /* Size of blocks in contained MTD */
+ uint32_t blocksize :18; /* Size of blocks in contained MTD */
uint32_t erasesize :18; /* Size of erase block in contained MTD */
Review comment:
why not remove 14/18 from the struct directly? with your change, we always need 64bits storage now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org