keil中内存的存储规律
keil中内存的存储规律
文章目录
keil中内存的存储规律
#include <stdlib.h>
#include "gd32f30x.h"
#include "led_drv.h"
#include "delay.h"
#include "key_drv.h"
#include "systick.h"
#include "usb2com_drv.h"
void Endian(void);
uint64_t current;
uint64_t prvent;
int main(void)
{
SystickInit();
LedDrvInit();
KeyDrvInit();
Usb2ComDrvInit();
Endian();
}
void Endian(void)
{
int temp = 0x11223344;
void* vpTemp = NULL;
vpTemp = &temp;
uint8_t btemp = *((uint8_t* )vpTemp+2);
printf("%x\r\n", btemp);
}
结论:keil中内存的存储方式和在vs中是一样的。我的另外一篇文章中有描述
该篇文章的链接
windows内存存储的规律