This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
1、Our application code is in BANK0;
2、In IAR ICF file, we define the FAPI lib in SRAM;
3、the code to erase the setor8 in Bank0 ;
4、prefecth abort
why? I need help please, Thanks a lot.
Hi,
The Flash APIs and the function that calls Flash API directly should be copied to SRAM and executed from SRAM.
Hi,
Here is the ARMCL to CLANG migration guide:
About the Pragmas and Attributes, please refer to:
Hi, Mr Wang, Thanks great for your reply.
I've just confirmed my source code that the Flash APIs and the functions that calls Flash API directly has been copied to SRAM and executed from SRAM.
I've found another question in this link:
in this question, you said as follows:
Can you help me to get Flash API 2.1.0? or tell me where to download the Flash API 2.1.0.
I want to have a try to use the Flash API 2.1.0.
Thanks a lot aggain!
Can you help me to get Flash API 2.1.0? or tell me where to download the Flash API 2.1.0.
Please reference the release note of V2.01.01:
This is my example to program data to sector 1 of Bank 0
/** @file sys_main.c * @brief Application main file * @date 11-Dec-2018 * @version 04.07.01 * * This file contains an empty main function, * which can be used for the application. */ /* * Copyright (C) 2009-2018 Texas Instruments Incorporated - www.ti.com * * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* USER CODE BEGIN (0) */ /* USER CODE END */ #include "bl_flash.h" #include "F021.h" #if 1 extern unsigned int apiLoadStart; extern unsigned int apiLoadSize; extern unsigned int apiRunStart; #endif void main(void) { uint32_t status, i; /* Copy the flash APIs to SRAM*/ memcpy(&apiRunStart, &apiLoadStart, (uint32)&apiLoadSize); uint32_t Success[] = {0xbd0400ea, 0x12345678, 0x5a5a5a5a, 0x37373737, 0x19191919, 0x28282828, 0xabababab, 0xcdcdcdcd, 0x38b50546, 0x0c46062d, 0x05d0082d, 0x03d00e2d, 0x18bf0520, 0x08d11020, 0x00f034fa, 0x03480460}; for(i=0; i<2; i++){ status = Fapi_BlockErase(0x80000, 8); status = Fapi_BlockProgram(0x80100, (unsigned long)&Success, 64); } while(1); } /* USER CODE END */