atmelcorp / atmel-software-package

Atmel Software Package
Other
110 stars 76 forks source link

freertos不支持MMU,而examples移植的freertos_lwip却启用了MMU。应该不对。 #87

Closed ghbear2020 closed 4 years ago

ghbear2020 commented 4 years ago

WEAK void board_init(void) {

ifdef VARIANT_DDRAM

bool ddram = false;

else

bool ddram = true;

endif

ifdef VARIANT_SRAM

bool clocks = true;

else

bool clocks = false;

endif

/* Configure misc low-level stuff */
board_cfg_lowlevel(clocks, ddram, true);  // 启用MMU

board_cfg_lowlevel(clocks, ddram, true);这句应改为: board_cfg_lowlevel(clocks, ddram, false); 但是,这样改了,IAR下载程序后却跑不起来了。 不知是何原因?请指教!(VARIANT_DDRAM我也定义了)

ghbear2020 commented 4 years ago

1, I want an freertos example of running in DDRAM without MMU. on the board sama5d2-xplained. 2, Does the USB function must need the MMU? thx!

TonyHan11 commented 4 years ago

hi, In softpack identical address translation is used between physical address and virtual address, the addresses are just the same so MMU could be used with freertos without issues.

ghbear2020 commented 4 years ago

hi, In softpack identical address translation is used between physical address and virtual address, the addresses are just the same so MMU could be used with freertos without issues.

Why MMU must be enabled?for USB ?

TonyHan11 commented 4 years ago

Some USB descriptor's length is odd, this cause some unaligned access problem when cache is disabled. Therefore, if we put --no_unaligned_access to some USB code (for example lib/usb/common/usb_descriptors.c) to avoid unaligned access, we can disable MMU. But, disable MMU cost a lot of performance drop, therefore, we suggest use MMU enabled.

ghbear2020 commented 4 years ago

Some USB descriptor's length is odd, this cause some unaligned access problem when cache is disabled. Therefore, if we put --no_unaligned_access to some USB code (for example lib/usb/common/usb_descriptors.c) to avoid unaligned access, we can disable MMU. But, disable MMU cost a lot of performance drop, therefore, we suggest use MMU enabled.

atmel-software-package,Do you have any related forums for this library(atmel-software-package)? In this way, we can ask each other questions. thx.

TonyHan11 commented 4 years ago

For any issues about software package you can ask for support using support hotline or salesforce, and creating tickets in github is OK too, thanks.