atmel-uc3

Atmelstudio UC3C AVR32 - framework objects in wrong place in memory?

泪湿孤枕 提交于 2019-12-12 04:36:18
问题 During the setup of a CAN transmission, a Pointer is being corrupted (it goes from a valid 0x00000bd0 to a 0x84520000 that is out of the bounds of my RAM). The pointer is also unrelated to the CAN activity. The reason for the corruption is, that a union64 is written over the address of the pointer. This union64 belongs to the CANIF object (from ASF), in sourcecode the corruption happens here: void CAN_SendMsg_KMS(uint64_t msg) { CANIF_mob_get_ptr_data(ACTIVECHANNEL,0)->data = (Union64)msg;

C Undefined reference

独自空忆成欢 提交于 2019-12-11 08:02:07
问题 I have the following code: main.c #include "checksum.h" void main() { char *Buf ="GPGGA204502.005106.9813N11402.2921W1090.91065.02M-16.27M"; checksum(Buf); } checksum.c #include <stdio.h> #include <string.h> checksum(char *Buff) { int i; unsigned char XOR; unsigned long iLen = strlen(Buff); printf("Calculating checksum...\n"); for (XOR = 0, i = 0; i < iLen; i++) XOR ^= (unsigned char)Buff[i]; printf("%X \n",XOR); } checksum.h #ifndef CHECKSUM_H_INCLUDED #define CHECKSUM_H_INCLUDED void