Skip to content

Commit

Permalink
Merge pull request #347 from raulcxw/rel_1.3.0
Browse files Browse the repository at this point in the history
rel_1.3.0 update for compile
  • Loading branch information
junjiec authored Jun 13, 2018
2 parents 5aa09ab + fee16ba commit 06b1412
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 22 deletions.
2 changes: 0 additions & 2 deletions board/amebaz_dev/amebaz_dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ $(NAME)_SOURCES := board.c
GLOBAL_INCLUDES += .
GLOBAL_DEFINES += STDIO_UART=0

GLOBAL_CFLAGS += -DON_PRE2=1

CONFIG_SYSINFO_PRODUCT_MODEL := ALI_AOS_RTL8710BN
CONFIG_SYSINFO_DEVICE_NAME := RTL8710BN

Expand Down
2 changes: 1 addition & 1 deletion build/aos_target_build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ $(HEX_OUTPUT_FILE): $(STRIPPED_LINK_OUTPUT_FILE)

ifeq ($(PING_PONG_OTA),1)
$(LINK_OUTPUT_FILE_XIP2): $(LINK_OUTPUT_FILE)
display_map_summary: $(LINK_OUTPUT_FILE_XIP2) $(AOS_SDK_CONVERTER_OUTPUT_FILE) $(AOS_SDK_FINAL_OUTPUT_FILE)
display_map_summary: $(LINK_OUTPUT_FILE) $(AOS_SDK_CONVERTER_OUTPUT_FILE) $(AOS_SDK_FINAL_OUTPUT_FILE)
$(QUIET) $(call COMPILER_SPECIFIC_MAPFILE_DISPLAY_SUMMARY,$(MAP_OUTPUT_FILE))
else
display_map_summary: $(LINK_OUTPUT_FILE) $(AOS_SDK_CONVERTER_OUTPUT_FILE) $(AOS_SDK_FINAL_OUTPUT_FILE)
Expand Down
12 changes: 10 additions & 2 deletions platform/mcu/rtl8710bn/aos/aos_osdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ static int _aos_create_task(struct task_struct *ptask, const char *name,
static void _aos_delete_task(struct task_struct *ptask)
{
if (!ptask->task.hdl){
DBG_8195A("_freertos_delete_task(): ptask is NULL!\n");
DBG_8195A("_aos_delete_task(): ptask is NULL!\n");
return;
}

Expand Down Expand Up @@ -639,6 +639,11 @@ int _aos_timer_change_no_repeat(aos_timer_t *timer, int ms)
return -EINVAL;
}

ret = krhino_timer_stop(timer->hdl);
if (ret != RHINO_SUCCESS) {
return ret;
}

ret = krhino_timer_change(timer->hdl, MS2TICK(ms), 0);
if (ret == RHINO_SUCCESS) {
return 0;
Expand Down Expand Up @@ -694,6 +699,9 @@ u32 _aos_timerChangePeriodFromISR( _timerHandle xTimer,
{
if(xNewPeriod == 0)
xNewPeriod += 1;

(u32)aos_timer_stop(&xTimer->timer);

return !aos_timer_change(&xTimer->timer, xNewPeriod);
}

Expand Down Expand Up @@ -747,7 +755,7 @@ void _aos_wakelock_timeout(uint32_t timeout)

#elif defined(CONFIG_PLATFORM_8711B)
if (pmu_yield_os_check())
pmu_set_sysactive_time(PMU_WLAN_DEVICE, timeout);
pmu_set_sysactive_time(timeout);
else
DBG_INFO("can't aquire wake during suspend flow!!\n");
#endif
Expand Down
34 changes: 22 additions & 12 deletions platform/mcu/rtl8710bn/script/postbuild_img2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,29 @@ set outputdir=%2\out\%outputname%\binary
::echo ota_bin_ver=%ota_bin_ver% >>tmp.txt
IF NOT EXIST %bindir% MD %bindir%
if "%ota_offset%"=="0x0800B000" (
copy %outputdir%\%outputname%.elf %bindir%\Application.axf
copy %outputdir%\%outputname%.elf %bindir%\application.axf
) else (
copy %outputdir%\%outputname%.xip2.elf %bindir%\Application.axf
copy %outputdir%\%outputname%.xip2.elf %bindir%\application.axf
)
del Debug\Exe\target.map Debug\Exe\application.asm *.bin
cmd /c "%tooldir%\nm %bindir%/application.axf | %tooldir%\sort > %bindir%/application.map"
cmd /c "%tooldir%\objdump -d %bindir%/application.axf > %bindir%/application.asm"
del Debug\Exe\target.map Debug\Exe\application.asm

for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __ram_image2_text_start__ %bindir%/application.map | %tooldir%\gawk '{print $1}'"') do set ram2_start=0x%%i
for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __ram_image2_text_end__ %bindir%/application.map | %tooldir%\gawk '{print $1}'"') do set ram2_end=0x%%i
%tooldir%\nm ./Debug/Exe/application.axf | %tooldir%\sort > ./Debug/Exe/application.map

for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __xip_image2_start__ %bindir%/application.map | %tooldir%\gawk '{print $1}'"') do set xip_image2_start=0x%%i
for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __xip_image2_end__ %bindir%/application.map | %tooldir%\gawk '{print $1}'"') do set xip_image2_end=0x%%i
%tooldir%\objdump -d ./Debug/Exe/application.axf > ./Debug/Exe/application.asm

if "%ota_offset%"=="0x0800B000" (
copy %bindir%\application.map %bindir%\application.xip1.map
copy %bindir%\application.asm %bindir%\application.xip1.asm
) else (
copy %bindir%\application.map %bindir%\application.xip2.map
copy %bindir%\application.asm %bindir%\application.xip2.asm
)

for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __ram_image2_text_start__ ./Debug/Exe/application.map | %tooldir%\gawk '{print $1}'"') do set ram2_start=0x%%i
for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __ram_image2_text_end__ ./Debug/Exe/application.map | %tooldir%\gawk '{print $1}'"') do set ram2_end=0x%%i

for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __xip_image2_start__ ./Debug/Exe/application.map | %tooldir%\gawk '{print $1}'"') do set xip_image2_start=0x%%i
for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __xip_image2_end__ ./Debug/Exe/application.map | %tooldir%\gawk '{print $1}'"') do set xip_image2_end=0x%%i

::echo ram2_start: %ram2_start% > tmp.txt
::echo ram2_end: %ram2_end% >> tmp.txt
Expand All @@ -53,9 +63,9 @@ for /f "delims=" %%i in ('cmd /c "%tooldir%\grep __xip_image2_end__ %bindir%/app
::del tmp.txt
::echo sectname_ram2: %sectname_ram2% sectname_xip: %sectname_xip% sectname_rdp: %sectname_rdp% >tmp1.txt

%tooldir%\objcopy -j .ram_image2.entry -j .ram_image2.data -j .ram_image2.text -j .ram_image2.bss -j .ram_image2.skb.bss -j .ram_heap.data -Obinary %bindir%/application.axf %bindir%/ram_2.r.bin
%tooldir%\objcopy -j .xip_image2.text -Obinary %bindir%/application.axf %bindir%/xip_image2.bin
%tooldir%\objcopy -j .ram_rdp.text -Obinary %bindir%/application.axf %bindir%/rdp.bin
%tooldir%\objcopy -j .ram_image2.entry -j .ram_image2.data -j .ram_image2.text -j .ram_image2.bss -j .ram_image2.skb.bss -j .ram_heap.data -Obinary ./Debug/Exe/application.axf ./Debug/Exe/ram_2.r.bin
%tooldir%\objcopy -j .xip_image2.text -Obinary ./Debug/Exe/application.axf ./Debug/Exe/xip_image2.bin
%tooldir%\objcopy -j .ram_rdp.text -Obinary ./Debug/Exe/application.axf ./Debug/Exe/rdp.bin

:: remove bss sections
%tooldir%\pick %ram2_start% %ram2_end% %bindir%\ram_2.r.bin %bindir%\ram_2.bin raw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ SECTIONS
*(.bdsram.data*)
__bss_end__ = .;
} > BD_RAM
end =.;

.ram_heap.data :
{
*(.bfsram.data*)
} > BD_RAM

. = ALIGN(8);
PROVIDE(heap_start = .);
PROVIDE(heap_end = 0x1003DFFF);
PROVIDE(heap_end = 0x1003CFFF);
PROVIDE(heap_len = heap_end - heap_start);

.rom.bss :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ SECTIONS
*(.bdsram.data*)
__bss_end__ = .;
} > BD_RAM
end =.;

.ram_heap.data :
{
*(.bfsram.data*)
} > BD_RAM

. = ALIGN(8);
PROVIDE(heap_start = .);
PROVIDE(heap_end = 0x1003DFFF);
PROVIDE(heap_end = 0x1003CFFF);
PROVIDE(heap_len = heap_end - heap_start);

.rom.bss :
Expand Down
2 changes: 1 addition & 1 deletion platform/mcu/rtl8710bn/sdk/component/os/freertos_pmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void pmu_clean_wakelock_stat(void);
* - 1: _SUCCESS
*/
//uint32_t pmu_set_sysactive_time(uint32_t timeout_ms);
uint32_t pmu_set_sysactive_time(uint32_t nDeviceId, uint32_t timeout);
uint32_t pmu_set_sysactive_time(uint32_t timeout);
void pmu_add_wakeup_event(uint32_t event);
void pmu_del_wakeup_event(uint32_t event);

Expand Down

0 comments on commit 06b1412

Please sign in to comment.