ATSAME54P20A--定址

作者 Gordon0010 於 2020年05月21日 17:34:19
想請問為何使用絕對定址但出現錯誤?

#include <stddef.h>      // Defines NULL
#include <stdbool.h>     // Defines true
#include <stdlib.h>      // Defines EXIT_FAILURE
#include "definitions.h" // SYS function prototypes
//=========================================================================================================================================================
uint8_t Can0MessageRAM[CAN0_MESSAGE_RAM_CONFIG_SIZE] __attribute__((aligned(32), address(0x20000000)));                                
uint8_t Can1MessageRAM[CAN1_MESSAGE_RAM_CONFIG_SIZE] __attribute__((aligned(32), address(0x20000000 + CAN0_MESSAGE_RAM_CONFIG_SIZE)));
int main(void)
{
    
/* Initialize all modules */
    
SYS_Initialize(NULL);
    
SYSTICK_TimerStart();
    
LED0_Set();
    
SYSTICK_DelayMs(100);

    
/* Set Message RAM Configuration */
    
CAN0_MessageRAMConfigSet(Can0MessageRAM);
    
CAN1_MessageRAMConfigSet(Can1MessageRAM);
    
CAN1_RxCallbackRegister(APP_CAN_Callback, (uintptr_t)APP_STATE_CAN_RECEIVE, CAN_MSG_ATTR_RX_FIFO0);
    
CAN1_TxCallbackRegister(APP_CAN_Callback, (uintptr_t)APP_STATE_CAN_TRANSMIT);
    
display_menu();
    while (
true)
    {
     }
}

//不知為何0x20000000及 CAN0_MESSAGE_RAM_CONFIG_SIZE中間的加號無法顯示


以下為compiler的錯誤訊息

Link Error
: Could not allocate section '_0c4b18f05ec644c4' at 0x20000000  
Link Error
: Could not allocate data memory
collect2
.exe: error: ld returned 255 exit status
make
[2]: *** [nbproject/Makefile-sam_e54_xpro.mk:336: dist/sam_e54_xpro/production/sam_e54_xpro.X.production.hex] Error 255
make
[1]: *** [nbproject/Makefile-sam_e54_xpro.mk:94: .build-conf] Error 2
make
: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2  
BUILD FAILED
(exit value 2, total time: 3s)


有無方法可以排除,感謝。

來自: http://www.microchip.com.tw/newbb/viewtopic.php?forum=11&topic_id=22894&post_id=80668