This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

there is some error about *.bin file.

hello:

    i wanna generate *.bin file by keil.  But I got a bin dictoty. The dic has the two file that  is ER$$.ARM.__AT_0x1000120C fie and ER_IROM1 file.   how can i  do ?

   the command is C:\Keil_v5\ARM\ARMCC\bin\fromelf.exe   --bin --output  ../../../hex/per.bin  ./_build/nrf52832_xxaa.axf

 

   after that, i change the command is C:\Keil_v5\ARM\ARMCC\bin\fromelf.exe   --bincombined  --bincombined _base=0x0001f000 --output  ../../../hex/per.bin  ./_build/nrf52832_xxaa.axf.

  i got a bin file. but the file size is 256M bytes.    

 so what i can do ,getting a correct bin file ???

   

Parents
  • Hello,

    Problem seems to be that the UICR.NFCPINS configuration is included in your binary image, which leads to excessive byte padding as the UICR section is mapped to a different address range than the flash memory.

    *.bin files do not contain address information like Intel hex files do, but rely on byte padding instead. In other words, to place data at address 0x1000120C, the binary must contain byte padding between the last address in flash and  the first address in UICR: 0x1000120C = ~256M.

    You can use the code in  system_nrf52.c to set the UICR.NFCPINS configuration at runtime so you don't have to include it in the image:

        /* Configure NFCT pins as GPIOs if NFCT is not to be used in your code. If CONFIG_NFCT_PINS_AS_GPIOS is not defined,
           two GPIOs (see Product Specification to see which ones) will be reserved for NFC and will not be available as
           normal GPIOs. */
        #if defined (CONFIG_NFCT_PINS_AS_GPIOS)
            if ((NRF_UICR->NFCPINS & UICR_NFCPINS_PROTECT_Msk) == (UICR_NFCPINS_PROTECT_NFC << UICR_NFCPINS_PROTECT_Pos)){
                NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
                while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
                NRF_UICR->NFCPINS &= ~UICR_NFCPINS_PROTECT_Msk;
                while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
                NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
                while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
                NVIC_SystemReset();
            }
        #endif

     

     

     

  • hi: 3k u . L have resolved the problem. the issus is like that. 

Reply Children
No Data
Related