Skip to content

Commit

Permalink
fix #43
Browse files Browse the repository at this point in the history
  • Loading branch information
esm-tmori committed Mar 12, 2021
1 parent 33ef12a commit 754dd8e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/device/mpu/mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,16 @@ uint8 *mpu_address_get_ram(uint32 addr, uint32 size)
uint8 *mpu_address_set_rom_ram(MpuAddressGetType getType, uint32 addr, uint32 size, void *mmap_addr)
{
MpuAddressRegionType *region = NULL;

#ifdef OS_LINUX
if (getType == MpuAddressGetType_MMAP) {
region = search_region(0U, addr, 1U);
if (region != NULL) {
region->data = mmap_addr;
printf("INFO: MMAPDED addr=0x%x size=0x%x\n", region->start, region->size);
return mmap_addr;
}
}
#endif
region = mpu_address_search_region(addr, size);

if (region == NULL) {
Expand Down

0 comments on commit 754dd8e

Please sign in to comment.