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

global variable "flash_error_code " is not initialized #24

Open
HirokiIshiguro opened this issue Jan 8, 2020 · 0 comments
Open

global variable "flash_error_code " is not initialized #24

HirokiIshiguro opened this issue Jan 8, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@HirokiIshiguro
Copy link
Member

Describe the bug
global variable "flash_error_code " is not initialized so always success during whole of bootloader sequence using R_FLASH_Erase(), R_FLASH_Write() etc.

System information

  • RX65N RSK
  • e2 studio
  • Windows
  • v1.4.7
  • Project OTA

Expected behavior
Each R_FLASH_Erase(), R_FLASH_Write() callback can detect the errors.

Screenshots or console output
none

To reproduce
none (difficult)

Code to reproduce the bug
none (difficult)

Additional context
Before:

static void my_flash_callback(void *event)
{
	uint32_t event_code = FLASH_ERR_FAILURE;
	event_code = *((uint32_t*)event);
    if((event_code == FLASH_INT_EVENT_WRITE_COMPLETE) || (event_code == FLASH_INT_EVENT_ERASE_COMPLETE))
    {
    	flash_error_code = FLASH_SUCCESS;
    }

After

static void my_flash_callback(void *event)
{
	uint32_t event_code = FLASH_ERR_FAILURE;
	event_code = *((uint32_t*)event);
        flash_error_code = 0xffffffff; /* error */
    if((event_code == FLASH_INT_EVENT_WRITE_COMPLETE) || (event_code == FLASH_INT_EVENT_ERASE_COMPLETE))
    {
    	flash_error_code = FLASH_SUCCESS;
    }

Thank you!

@HirokiIshiguro HirokiIshiguro added the bug Something isn't working label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant