diff --git a/RTL00_SDKV35a/component/common/mbed/hal_ext/sleep_ex_api.h b/RTL00_SDKV35a/component/common/mbed/hal_ext/sleep_ex_api.h index 9d47acf..c87ec86 100644 --- a/RTL00_SDKV35a/component/common/mbed/hal_ext/sleep_ex_api.h +++ b/RTL00_SDKV35a/component/common/mbed/hal_ext/sleep_ex_api.h @@ -62,6 +62,14 @@ typedef struct _SLEEP_WKUP_EVENT_ { * * The processor can be woken up by any internal peripheral interrupt or external pin interrupt. * + * Процессор настроен для сна и отправлен спать с помощью __WFI(). + * В этом режиме системные часы ядра останавливаются до тех пор, пока не произойдет сброс или прерывание. + * Это снижает динамическую мощность используемую процессором, системами памяти и шинами. + * Процессор, периферийное устройство и состояние памяти поддерживаются, + * а периферийные устройства продолжают работать и могут генерировать прерывания. + * + * Процессор может быть разбужен любым внутренним периферийным прерыванием или внешним прерыванием. + * * @note * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored. * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be @@ -72,6 +80,8 @@ void sleep_ex_selective(uint32_t wakeup_event, uint32_t sleep_duration, uint32_ void standby_wakeup_event_add(uint32_t wakeup_event, uint32_t sleep_duration_ms, uint32_t gpio_active); void standby_wakeup_event_del(uint32_t wakeup_event); + + void deepstandby_ex(void); /** Send the microcontroller to deep sleep @@ -79,13 +89,18 @@ void deepstandby_ex(void); * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode * has the same sleep features as sleep plus it powers down peripherals and clocks. All state * is still maintained. + * Этот процесc настроен на глубокий сон и отправлен спать с помощью __WFI(). + * Этот режим имеет те же функции сна, что и sleep, но отключает периферийные устройства и часы. + * Все состояния сохраняются. * * The processor can only be woken up by an external interrupt on a pin or a timer. + * Процессор может быть разбужен только внешним прерыванием на штыре или таймере. * * @note * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored. * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be * able to access the LocalFileSystem + * */ void deepsleep_ex(uint32_t wakeup_event, uint32_t sleep_duration); diff --git a/RTL00_SDKV35a/component/common/mbed/targets/hal/rtl8195a/sleep.c b/RTL00_SDKV35a/component/common/mbed/targets/hal/rtl8195a/sleep.c index d629573..e7b54c3 100644 --- a/RTL00_SDKV35a/component/common/mbed/targets/hal/rtl8195a/sleep.c +++ b/RTL00_SDKV35a/component/common/mbed/targets/hal/rtl8195a/sleep.c @@ -178,9 +178,9 @@ void standby_wakeup_event_add(uint32_t wakeup_event, uint32_t sleep_duration_ms, DStandbyWakeupEvent.gpio_option &= ~gpio_act; } } - gpio_event = gpio_event << 1; - gpio_en = gpio_en << 1; - gpio_act = gpio_act << 1; + gpio_event <<= 1; + gpio_en <<= 1; + gpio_act <<= 1; } } diff --git a/RTL00_SDKV35a/component/common/network/rtsp/rtsp_api.h b/RTL00_SDKV35a/component/common/network/rtsp/rtsp_api.h index 7bc7fa5..65703ff 100644 --- a/RTL00_SDKV35a/component/common/network/rtsp/rtsp_api.h +++ b/RTL00_SDKV35a/component/common/network/rtsp/rtsp_api.h @@ -98,7 +98,7 @@ struct stream_context #define RTP_PT_H263 34 #define RTP_PT_RTCP_BASE 72 #define RTP_PT_DYN_BASE 96 -#define RTP_PT_UNKNOWN -1 +//?#define RTP_PT_UNKNOWN -1 #include "section_config.h" SDRAM_DATA_SECTION @@ -333,4 +333,4 @@ void fillRtpHeader(rtp_hdr_t *rtphdr, int version, int padding, int extension, i /************************************************************** end of rtp **************************************************************/ -#endif \ No newline at end of file +#endif diff --git a/RTL00_SDKV35a/component/common/video/v4l2/inc/uapi_videodev2.h b/RTL00_SDKV35a/component/common/video/v4l2/inc/uapi_videodev2.h index ebdf807..9e47165 100644 --- a/RTL00_SDKV35a/component/common/video/v4l2/inc/uapi_videodev2.h +++ b/RTL00_SDKV35a/component/common/video/v4l2/inc/uapi_videodev2.h @@ -2016,9 +2016,9 @@ struct v4l2_create_buffers { * I O C T L C O D E S F O R V I D E O D E V I C E S * */ -#define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability) -#define VIDIOC_RESERVED _IO('V', 1) -#define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) +#define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability) +#define VIDIOC_RESERVED _IO('V', 1) +#define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) #define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format) #define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers) diff --git a/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-dev.h b/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-dev.h index 417eaab..aaf74a8 100644 --- a/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-dev.h +++ b/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-dev.h @@ -56,14 +56,14 @@ struct v4l2_prio_state { /* enum v4l2_priority { - V4L2_PRIORITY_UNSET = 0, // l - V4L2_PRIORITY_BACKGROUND = 1, // I - V4L2_PRIORITY_INTERACTIVE = 2, // - V4L2_PRIORITY_RECORD = 3, // + V4L2_PRIORITY_UNSET = 0, // ����l�� + V4L2_PRIORITY_BACKGROUND = 1, // �I�� + V4L2_PRIORITY_INTERACTIVE = 2, // ���� + V4L2_PRIORITY_RECORD = 3, // ���� V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE, }; -ɬvOFMultiple Opensާ@AiHdevicePɳQhthread }(i.e open()) -ݭnγouvhϤӾާ@󭫭nAϥΪuŧOAprios[4]N[@C +ɬ���v�O���FMultiple Opens�ާ@�A��i�H���device�P�ɳQ�h��thread ���}(i.e open()) +�ݭn�γo�u���v�h�Ϥ����Ӿާ@�󭫭n�A�ϥΪ������u���ŧO�A��prios[4]�N�[�@�C */ void v4l2_prio_init(struct v4l2_prio_state *global); @@ -80,10 +80,10 @@ struct v4l2_file_operations { //ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); //ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); //unsigned int (*poll) (struct file *, struct poll_table_struct *); - long (*ioctl) (unsigned int, unsigned long); - long (*unlocked_ioctl) (unsigned int, unsigned long); + long (*ioctl) (unsigned int, void *); //pvvx unsigned long); + long (*unlocked_ioctl) (unsigned int, void *); //pvvx unsigned long); #ifdef CONFIG_COMPAT - long (*compat_ioctl32) (unsigned int, unsigned long); + long (*compat_ioctl32) (unsigned int, void *); //pvvx unsigned long); #endif //unsigned long (*get_unmapped_area) (struct file *, unsigned long, // unsigned long, unsigned long, unsigned long); diff --git a/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-osdep.h b/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-osdep.h index 581fd99..3e2b7ee 100644 --- a/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-osdep.h +++ b/RTL00_SDKV35a/component/common/video/v4l2/inc/v4l2-osdep.h @@ -218,22 +218,12 @@ #endif /* Atomic integer operations */ -#ifndef atomic_set +#if 0 #define atomic_set(v, i) RTL_ATOMIC_SET((v), (i)) -#endif -#ifndef atomic_read #define atomic_read(v) RTL_ATOMIC_READ((v)) -#endif -#ifndef atomic_add #define atomic_add(v, i) RTL_ATOMIC_ADD((v), (i)) -#endif -#ifndef atomic_sub #define atomic_sub(v, i) RTL_ATOMIC_SUB((v), (i)) -#endif -#ifndef atomic_inc #define atomic_inc(v) RTL_ATOMIC_INC((v)) -#endif -#ifndef atomic_dec #define atomic_dec(v) RTL_ATOMIC_DEC((v)) #endif @@ -291,7 +281,7 @@ /* - * combine the four dirAtypeAnrAsize parameters to one cmd parameter + * combine the four dir�Atype�Anr�Asize parameters to one cmd parameter * */ #ifndef _IOC @@ -511,40 +501,40 @@ found: static inline unsigned long find_next_zero_bit( const unsigned long *addr,unsigned long size, unsigned long offset) { - const unsigned long *p = addr + BIT_WORD(offset); // offset_pVlonga}32? - unsigned long result = offset & ~(BITS_PER_LONG-1); // offsetOresult?4r? + const unsigned long *p = addr + BIT_WORD(offset); // offset��_p���V��long�a�}32���? + unsigned long result = offset & ~(BITS_PER_LONG-1); // offset�O��result?4�r? unsigned long tmp; if (offset >= size) return size; - size -= result; // ?32㭿?W - offset %= BITS_PER_LONG; // offset_32쪺ĤL - if (offset) { // offsetb@?long?u0W,b1-31줤[luther.gliethttp] + size -= result; // ?��32��㭿?�W + offset %= BITS_PER_LONG; // offset��_32�쪺�ĤL�� + if (offset) { // offset���b�@?long?�u����0��W,�b1-31�줤[luther.gliethttp] tmp = *(p++); - tmp |= ~0UL >> (BITS_PER_LONG - offset); // ?0-offset?uRW1. - if (size < BITS_PER_LONG) // 32bits + tmp |= ~0UL >> (BITS_PER_LONG - offset); // ?0-offset?�u��R�W1. + if (size < BITS_PER_LONG) // ����32bits goto found_first; - if (~tmp) // DD0?t0 + if (~tmp) // ���D�D0?���t��0�� goto found_middle; - size -= BITS_PER_LONG; // pGW~tmp_0,\??*p?u?321.[luther.gliethttp] + size -= BITS_PER_LONG; // �p�G�W��~tmp���_0,���\?��?*p?�u?32���1.[luther.gliethttp] result += BITS_PER_LONG; } - while (size & ~(BITS_PER_LONG-1)) { // nF,??,?offsetw??b4r?0W,U? - if (~(tmp = *(p++))) // 4r?ֳtd?.pG~tmpD0,??32?ut0?u,.[luther.gliethttp] + while (size & ~(BITS_PER_LONG-1)) { // �n�F,?���?��,��?��offset�w??�b4�r?����0��W,�U��?�� + if (~(tmp = *(p++))) // 4�r?�ֳt�d?.�p�G~tmp�D0,?��?32��?�u���t��0?�u,���.[luther.gliethttp] goto found_middle; - result += BITS_PER_LONG; // U@?4r?? - size -= BITS_PER_LONG; // ?4r??u + result += BITS_PER_LONG; // ��U�@?4�r?��? + size -= BITS_PER_LONG; // ?��4�r??�u } - if (!size) // size_0,?size_4r?㭿?,䦸Ҧ?uw?d, - return result; // Ҧ?u?1,???0,result_size.[luther.gliethttp] - tmp = *p; // sizeO32㭿?,?ѤL?bit??d,???U?du@.[luther.gliethtp] + if (!size) // size���_0,?������size���_4�r?�㭿?,�䦸�Ҧ�?�u�w?�d��, + return result; // �Ҧ�?�u����?1,?��??0��,result���_size.[luther.gliethttp] + tmp = *p; // size���O32��㭿?,?�ѤL?bit?��?�d,???��U��?�d�u�@.[luther.gliethtp] found_first: - tmp |= ~0UL << size; // ?b0-size??u,size-31?ϥΪ?,ҥH?size-31m1. - if (tmp == ~0UL) /* Are any bits zero? */ // pGtmp1,\?N?1? - return result + size; /* Nope. */ // result+sizeN_??J??sizejp.[luther.gliethttp] + tmp |= ~0UL << size; // ?�b0-size?����?�u,size-31?���ϥΪ�?,�ҥH��?size-31�m����1. + if (tmp == ~0UL) /* Are any bits zero? */ // �p�Gtmp��1,���\?���N?���1? + return result + size; /* Nope. */ // result+size�N���_��??�J��??size�j�p.[luther.gliethttp] found_middle: - return result + ffz(tmp); // ?b32?u0-31??wsb0,?LOĤL.[luther.gliethttp] + return result + ffz(tmp); // ��?�b32��?�u��0-31��??���w�s�b0���,?��L�O�ĤL��.[luther.gliethttp] } //int find_next_zero_bit(const void * p, int size, int offset); @@ -570,7 +560,7 @@ static inline void set_bit(int nr, volatile unsigned long *addr) unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long flags; - + (void)flags; //taskENTER_CRITICAL(); _atomic_spin_lock_irqsave(p, flags); *p |= mask; @@ -594,6 +584,7 @@ static inline void clear_bit(int nr, volatile unsigned long *addr) unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long flags; + (void)flags; _atomic_spin_lock_irqsave(p, flags); //taskENTER_CRITICAL(); *p &= ~mask; @@ -617,6 +608,7 @@ static inline void change_bit(int nr, volatile unsigned long *addr) unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long flags; + (void)flags; //taskENTER_CRITICAL(); _atomic_spin_lock_irqsave(p, flags); *p ^= mask; @@ -638,8 +630,8 @@ static inline int test_and_set_bit(int nr, volatile unsigned long *addr) unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long old; - //unsigned long flags; - + unsigned long flags; + (void)flags; //taskENTER_CRITICAL(); _atomic_spin_lock_irqsave(p, flags); @@ -667,6 +659,7 @@ static inline int test_and_clear_bit(int nr, volatile unsigned long *addr) unsigned long old; unsigned long flags; + (void)flags; //taskENTER_CRITICAL(); _atomic_spin_lock_irqsave(p, flags); old = *p; @@ -691,7 +684,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) unsigned long old; unsigned long flags; - + (void)flags; _atomic_spin_lock_irqsave(p, flags); old = *p; *p = old ^ mask; @@ -725,6 +718,7 @@ static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, static inline int atomic_inc_return(volatile atomic_t *v) { unsigned long flags; + (void)flags; int retval; cris_atomic_save(v, flags); retval = ++(v->counter); @@ -741,6 +735,7 @@ typedef __u64 __be64; typedef __u16 __sum16; typedef __u32 __wsum; +#if 0 #ifndef __GFP_WAIT #define __GFP_WAIT (0x10u) #endif @@ -770,6 +765,8 @@ typedef __u32 __wsum; #define copy_to_user(to, from, sz) _memcpy((to), (from), (sz)) #endif +#endif + #if 0 /*comment since we are not using polling*/ /* These are specified by iBCS2 */ #ifndef POLLIN @@ -843,4 +840,4 @@ do { \ #define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) #endif -#endif /*_V4L2_OSDEP_H_*/ \ No newline at end of file +#endif /*_V4L2_OSDEP_H_*/ diff --git a/RTL00_SDKV35a/component/os/freertos/cmsis_os.c b/RTL00_SDKV35a/component/os/freertos/cmsis_os.c index 7225c96..db6c3d4 100644 --- a/RTL00_SDKV35a/component/os/freertos/cmsis_os.c +++ b/RTL00_SDKV35a/component/os/freertos/cmsis_os.c @@ -3,7 +3,12 @@ #include "cmsis_os.h" #include "diag.h" +#if CONFIG_DEBUG_LOG > 2 #define CMSIS_OS_ERR(fmt, args...) DBG_8195A("\n\r%s: " fmt, __FUNCTION__, ## args) +#else +#define CMSIS_OS_ERR(fmt, args...) +#endif + extern void *_memset( void *s, int c, SIZE_T n ); #define os_memset _memset diff --git a/RTL00_SDKV35a/component/os/freertos/cmsis_os.h b/RTL00_SDKV35a/component/os/freertos/cmsis_os.h index 93f78e3..642fbe8 100644 --- a/RTL00_SDKV35a/component/os/freertos/cmsis_os.h +++ b/RTL00_SDKV35a/component/os/freertos/cmsis_os.h @@ -804,9 +804,9 @@ osStatus osMailFree (osMailQId queue_id, void *mail); #endif // Mail Queues available -//#undef malloc +#undef malloc #define malloc(size) pvPortMalloc(size) -//#undef free +#undef free #define free(pbuf) vPortFree(pbuf) extern void *calloc_freertos(size_t nelements, size_t elementSize); diff --git a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/include/portable.h b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/include/portable.h index d48d6db..119ae00 100644 --- a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/include/portable.h +++ b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/include/portable.h @@ -381,7 +381,7 @@ typedef struct HeapRegion * terminated by a HeapRegions_t structure that has a size of 0. The region * with the lowest start address must appear first in the array. */ -static void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ); +void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ); /* * Map to the memory management routines required for the port. diff --git a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/GCC/ARM_CM3/port.c b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/GCC/ARM_CM3/port.c index e873f85..c5ac1f2 100644 --- a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/GCC/ARM_CM3/port.c +++ b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/GCC/ARM_CM3/port.c @@ -725,6 +725,7 @@ __attribute__(( weak )) void vPortSetupTimerInterrupt( void ) /*-----------------------------------------------------------*/ #if configUSE_IDLE_HOOK +extern void WDGRefresh(void); void vApplicationIdleHook( void ) { /* Use the idle task to place the CPU into a low power mode. Greater power diff --git a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/MemMang/heap_5.c b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/MemMang/heap_5.c index 84cde2a..3734cef 100644 --- a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/MemMang/heap_5.c +++ b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/portable/MemMang/heap_5.c @@ -477,7 +477,7 @@ static void prvInsertBlockIntoFreeList(BlockLink_t *pxBlockToInsert) { } /*-----------------------------------------------------------*/ -static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) { +void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) { BlockLink_t *pxFirstFreeBlockInRegion = NULL, *pxPreviousFreeBlock; uint8_t *pucAlignedHeap; size_t xTotalRegionSize, xTotalHeapSize = 0; @@ -500,9 +500,9 @@ static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) { pxHeapRegion = &(pxHeapRegions[xDefinedRegions]); - uint8 chip_id = HalGetChipId(); + uint8_t chip_id = HalGetChipId(); while (pxHeapRegion->xSizeInBytes > 0) { - if (pxHeapRegion->pucStartAddress + if ((uint32_t)pxHeapRegion->pucStartAddress > 0x20000000 && chip_id >= CHIP_ID_8711AN && chip_id <= CHIP_ID_8711AF) { // pxHeapRegion->pucStartAddress = 0; // pxHeapRegion->xSizeInBytes = 0; @@ -585,6 +585,8 @@ static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) { } +extern void * rtl_memcpy(void *dst0, const void *src0, size_t len0); + void* pvPortReAlloc(void *pv, size_t xWantedSize) { BlockLink_t *pxLink; diff --git a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/tasks.c b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/tasks.c index 2fde546..003a4ee 100644 --- a/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/tasks.c +++ b/RTL00_SDKV35a/component/os/freertos/freertos_v8.1.2/Source/tasks.c @@ -78,6 +78,7 @@ task.h is included from an application file. */ #include "task.h" #include "timers.h" #include "StackMacros.h" +#include "tcm_heap.h" /* Lint e961 and e750 are suppressed as a MISRA exception justified because the MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined for the @@ -3570,7 +3571,7 @@ char * sprintf_pcTaskName(char * buf, char * name) cStatus = 0x00; break; } - pcWriteBuffer = sprintf_pcTaskName( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName); + pcWriteBuffer = sprintf_pcTaskName( pcWriteBuffer, (char *)pxTaskStatusArray[ x ].pcTaskName); sprintf( pcWriteBuffer, "\t%c\t%u\t%u\t%u\r\n", cStatus, ( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority, ( unsigned int ) pxTaskStatusArray[ x ].usStackHighWaterMark, ( unsigned int ) pxTaskStatusArray[ x ].xTaskNumber ); pcWriteBuffer += strlen( pcWriteBuffer ); @@ -3657,6 +3658,7 @@ char * sprintf_pcTaskName(char * buf, char * name) This will always be rounded down to the nearest integer. ulTotalRunTimeDiv100 has already been divided by 100. */ #if 1 + (void)ulDeltaRunTimeCounter; ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalTime; #else ulStatsAsPercentage = (100*pxTaskStatusArray[ x ].ulDelataRunTimeCounterOfPeroid) / ulDeltaTotalRunTime; @@ -3666,7 +3668,7 @@ char * sprintf_pcTaskName(char * buf, char * name) else ulDeltaRunTimeCounter = portCONFIGURE_STATS_PEROID_VALUE*ulStatsAsPercentage/100; #endif - pcWriteBuffer = sprintf_pcTaskName( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName); + pcWriteBuffer = sprintf_pcTaskName( pcWriteBuffer, (char *)pxTaskStatusArray[ x ].pcTaskName); if( ulStatsAsPercentage > 0UL ) { #ifdef portLU_PRINTF_SPECIFIER_REQUIRED diff --git a/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include/usb.h b/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include/usb.h index 4a13afd..e010a1d 100644 --- a/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include/usb.h +++ b/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/ram_lib/usb_otg/include/usb.h @@ -1358,7 +1358,7 @@ struct usb_hcd { unsigned long hcd_priv[0]; #elif defined (__GNUC__) unsigned long hcd_priv[0]; - __attribute__ ((aligned(sizeof(s64)))); +//? __attribute__ ((aligned(sizeof(s64)))); #endif }; @@ -2067,7 +2067,7 @@ struct usb_device_id { kernel_ulong_t driver_info; #elif defined (__GNUC__) kernel_ulong_t driver_info; - __attribute__((aligned(sizeof(kernel_ulong_t)))); +//? __attribute__((aligned(sizeof(kernel_ulong_t)))); #endif }; diff --git a/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_rtsp.a b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_rtsp.a new file mode 100644 index 0000000..1a6f455 Binary files /dev/null and b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_rtsp.a differ diff --git a/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_usbd.a b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_usbd.a new file mode 100644 index 0000000..77abf83 Binary files /dev/null and b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_usbd.a differ diff --git a/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_usbh.a b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_usbh.a new file mode 100644 index 0000000..453addb Binary files /dev/null and b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/lib_usbh.a differ diff --git a/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/rlx8195A-symbol-v04-img3.ld b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/rlx8195A-symbol-v04-img3.ld new file mode 100644 index 0000000..31d2c9e --- /dev/null +++ b/RTL00_SDKV35a/component/soc/realtek/8195a/misc/bsp/lib/common/GCC/rlx8195A-symbol-v04-img3.ld @@ -0,0 +1,262 @@ + +ENTRY(Reset_Handler) +ENTRY(main) + +INCLUDE "export-rom_v04.txt" + +MEMORY +{ + ROM (rx) : ORIGIN = 0x000000, LENGTH = 1M /* end 0x00100000 */ + ROM_USED_RAM (rwx): ORIGIN = 0x10000000, LENGTH = 0x2400 /* end 0x10002400 */ + BOOT_RAM (rwx) : ORIGIN = 0x10000bc8, LENGTH = 21560 /* end 0x10006000 */ + ROM_HEAP (rwx) : ORIGIN = 0x10002400, LENGTH = 3K /* end 0x10003000 */ + RAM_HEAP1 (rwx) : ORIGIN = 0x10003000, LENGTH = 12K /* end 0x10006000 */ + BD_RAM (rwx) : ORIGIN = 0x10006000, LENGTH = 424K /* end 0x10070000 */ + TCM (rwx) : ORIGIN = 0x1FFF0000, LENGTH = 64K /* end 0x20000000 */ + TCM_TAB (rwx) : ORIGIN = 0x1FFFFD00, LENGTH = 768 /* end 0x20000000 */ + SDRAM_RAM (rwx) : ORIGIN = 0x30000000, LENGTH = 2M /* end 0x30200000 */ +} + +EXTERN(RAM_IMG2_VALID_PATTEN) +EXTERN(InfraStart) + +SECTIONS +{ + /* 0x00000000: ROM */ + + .rom : + { + __rom_image_start__ = .; + KEEP(*(.rom)); + __rom_image_end__ = .; + } > ROM + + /* 0x10000000: SRAM */ + + .rom_ram : /* use in rom */ + { + __ram_image_start__ = .; + KEEP(*(.ram_dedecated_vector_table)) /* 0x10000000: NewVectorTable */ + KEEP(*(.ram_user_define_irq_table)) /* 0x10000100: UserIrqFunTable */ + KEEP(*(.ram_user_define_data_table)) /* 0x10000200: UserIrqDataTable */ + __rom_bss_start__ = .; + KEEP(*(.hal.ram.bss)) /* 0x10000300: CfgSysDebugWarn .. _pHAL_Gpio_Adapter */ + KEEP(*(.timer2_7_vector_table.data)) /* 0x10000358: Timer2To7VectorTable */ + KEEP(*(.infra.ram.bss)) /* 0x10000370: first .. z4 */ + KEEP(*(.mon.ram.bss)) /* 0x10000384: pUartLogCtl .. ArgvArray */ + KEEP(*(.wlan_ram_map)) /* 0x100006d4: rom_wlan_ram_map, FalseAlmCnt, ROMInfo, DM_CfoTrack */ + KEEP(*(.ram.rom.wlanmap)) /* align(8) */ + KEEP(*(.libc.ram.bss)) /* 0x10000760: rom_libgloss_ram_map __rtl_malloc_av_ __rtl_errno */ + __rom_bss_end__ = .; + } > ROM_USED_RAM + + /* 0x10000bc8: bootloader */ + + .ram_image1.text . : /* use in rom & boot */ + { + /* __ram_start_table_start__ = .; */ + __ram_image1_text_start__ = .; + KEEP(*(.boot.start.ram.data*)) + /* __image1_validate_code__ = .; */ + KEEP(*(.image1.validate.rodata)) + + KEEP(*(.infra.ram.data*)) + KEEP(*(.timer.ram.data*)) + KEEP(*(.cutb.ram.data*)) + KEEP(*(.cutc.ram.data*)) + KEEP(*(.libc.reent)) + KEEP(*(.rom.unc.data)) + KEEP(*(.sdr.rand2.data)) + + PROVIDE (__ram_image_end__ = .); /* 0x100020c0: end */ + + /* boot & images data */ + + KEEP(*(.hal.ram.data)) + KEEP(*(.hal.flash.data)) + KEEP(*(.boot.rodata*)) + KEEP(*(.boot.text*)) + KEEP(*(.boot.data*)) + __image1_bss_start__ = .; + KEEP(*(.boot.bss*)) + __image1_bss_end__ = .; + __ram_image1_text_end__ = .; + + } > BOOT_RAM + + .romheap : + { + __rom_heap_start__ = .; + end = __rom_heap_start__; + . = ALIGN(0x1000); + __rom_heap_end__ = .; + } > ROM_HEAP + + .ram_heap1 : + { + __ram_heap1_start__ = .; + /* *(.heap1*) */ + } > RAM_HEAP1 + + .tcm : + { + __ram_tcm_start__ = .; + __tcm_heap_start__ = .; + *(.tcm.heap) + } > TCM + + .soc_ps_monitor : + { + __tcm_heap_end__ = .; + } > TCM_TAB + + .image2.start.table : + { + __ram_heap1_end__ = .; + __ram_image2_text_start__ = .; + __image2_entry_func__ = .; + .image2.start.table1$$Base = .; + KEEP(*(SORT(.image2.ram.data*))) + __image2_validate_code__ = .; + KEEP(*(.image2.validate.rodata*)) + KEEP(*(.custom.validate.rodata*)) + } > BD_RAM + + .ram_image2.text : + { + *(.infra.ram.start*) + . = ALIGN(4); + KEEP(*(.init)) + + /* init data */ + . = ALIGN(4); + PROVIDE (__init_array_start = .); + KEEP(*(SORT(.init_array.*))) + KEEP(*(.init_array)) + PROVIDE (__init_array_end = .); + + . = ALIGN(4); + KEEP(*(.fini)) + + . = ALIGN(4); + PROVIDE (__fini_array_start = .); + KEEP(*(SORT(.fini_array.*))) + KEEP(*(.fini_array)) + PROVIDE (__fini_array_end = .); + + *(.mon.ram.text*) + *(.hal.flash.text*) + *(.hal.sdrc.text*) + *(.hal.gpio.text*) + *(.fwu.text*) + *(.otg.rom.text*) + *(.text*) +/* *(.sdram.text*) */ + *(.p2p.text*) + *(.wps.text*) + *(.websocket.text*) + } > BD_RAM + + .ram_image2.rodata : + { + *(.rodata*) + *(.fwu.rodata*) +/* *(.sdram.rodata*) */ + *(.p2p.rodata*) + *(.wps.rodata*) + *(.websocket.rodata*) + . = ALIGN(4); + xHeapRegions = .; + LONG(__ram_heap1_start__) + LONG(__ram_heap1_end__ - __ram_heap1_start__) + LONG(__ram_heap2_start__) + LONG(__ram_heap2_end__ - __ram_heap2_start__) + LONG(__sdram_heap_start__) + LONG(__sdram_heap_end__ - __sdram_heap_start__) + LONG(0) + LONG(0) + UartLogRamCmdTable = .; + KEEP(*(SORT(.mon.tab*))) + KEEP(*(SORT(.sdram.mon.tab*))) + UartLogRamCmdTable_end = .; + LONG(0) + } > BD_RAM + + PROVIDE(UartLogRamCmdTableSize = UartLogRamCmdTable_end - UartLogRamCmdTable); + + .ram.data : + { + __data_start__ = .; + *(.data*) + *(.p2p.data*) + *(.wps.data*) + *(.websocket.data*) +/* *(.sdram.data*) */ + __data_end__ = .; + __ram_image2_text_end__ = .; + } > BD_RAM + + .ram.bss : + { + __bss_start__ = .; + .ram.bss$$Base = .; + *(.hal.flash.data*) + *(.hal.sdrc.data*) + *(.hal.gpio.data*) + *(.fwu.data*) + *(.bdsram.data*) + *(.bfsram.data*) + *(COMMON) + *(.bss*) +/* *(.sdram.bss*) */ + *(.p2p.bss*) + *(.wps.bss*) + *(.websocket.bss*) + *(.ssl_ram_map*) + __bss_end__ = .; + .ram.bss$$Limit = .; + + } > BD_RAM + + .ram_heap2 : + { + . = ALIGN(8); + __ram_heap2_start__ = .; + *(.heap*) /* ucHeap */ + } > BD_RAM + __ram_heap2_end__ = 0x10070000; + + .sdr_text : + { + __sdram_data_start__ = .; + *(.sdram.text*) + } > SDRAM_RAM + + .sdr_rodata : + { + *(.sdram.rodata*) + } > SDRAM_RAM + + .sdr_data : + { + *(.sdram.data*) + __sdram_data_end__ = .; + } > SDRAM_RAM + + .sdr_bss : + { + __sdram_bss_start__ = .; + *(.uvc.ram.bss) + *(.sdram.bss*) + __sdram_bss_end__ = .; + . = ALIGN(8); + __sdram_heap_start__ = .; + } > SDRAM_RAM + __sdram_heap_end__ = 0x30200000; + + .boot.head : + { + KEEP(*(.loader.head*)) + } + ASSERT(__ram_image_end__ == 0x100020c0, "Error rom-bios-boot code & data!") +} diff --git a/RTL00_SDKV35a/component/soc/realtek/common/bsp/section_config.h b/RTL00_SDKV35a/component/soc/realtek/common/bsp/section_config.h index bc212b1..777a863 100644 --- a/RTL00_SDKV35a/component/soc/realtek/common/bsp/section_config.h +++ b/RTL00_SDKV35a/component/soc/realtek/common/bsp/section_config.h @@ -287,6 +287,12 @@ #define SDRAM_DATA_SECTION \ SECTION(".sdram.data") +#if defined(CONFIG_SDR_EN) +#define SDRAM_CODE_SECTION SECTION(".sdram.text") +#else +#define SDRAM_CODE_SECTION +#endif + //3 Wlan Section #define WLAN_ROM_TEXT_SECTION \ SECTION(".wlan.rom.text") diff --git a/RTL00_SDKV35a/sdkset.mk b/RTL00_SDKV35a/sdkset.mk index 825a814..edd8123 100644 --- a/RTL00_SDKV35a/sdkset.mk +++ b/RTL00_SDKV35a/sdkset.mk @@ -42,12 +42,13 @@ all: LIBS +=_platform_new _wlan _p2p _wps _websocket _sdcard _xmodem _mdns mp: LIBS +=_platform_new _wlan_mp _wps _p2p _websocket _sdcard _xmodem _mdns endif ifdef USE_UVC -all: LIBS +=_rtsp _usbh -mp: LIBS +=_rtsp _usbh +all: LIBS +=_rtsp _usbh _usbd +mp: LIBS +=_rtsp _usbh _usbd endif + # m c nosys gcc PATHLIBS = sdk/component/soc/realtek/8195a/misc/bsp/lib/common/gcc -LDFILE = rlx8195A-symbol-v04-img2.ld +LDFILE ?= rlx8195A-symbol-v04-img2.ld BOOTS = sdk/component/soc/realtek/8195a/misc/bsp/image # Include folder list diff --git a/build/bin/ota.bin b/build/bin/ota.bin index df810dc..a951306 100644 Binary files a/build/bin/ota.bin and b/build/bin/ota.bin differ diff --git a/build/bin/ram_1.p.bin b/build/bin/ram_1.p.bin index 9bb866f..9bfdcd5 100644 Binary files a/build/bin/ram_1.p.bin and b/build/bin/ram_1.p.bin differ diff --git a/build/bin/ram_2.bin b/build/bin/ram_2.bin index 6c94e5f..a121397 100644 Binary files a/build/bin/ram_2.bin and b/build/bin/ram_2.bin differ diff --git a/build/bin/ram_2.ns.bin b/build/bin/ram_2.ns.bin index f15e377..9846a71 100644 Binary files a/build/bin/ram_2.ns.bin and b/build/bin/ram_2.ns.bin differ diff --git a/build/bin/ram_2.p.bin b/build/bin/ram_2.p.bin index 0b0f2f6..ad689bb 100644 Binary files a/build/bin/ram_2.p.bin and b/build/bin/ram_2.p.bin differ diff --git a/build/bin/ram_all.bin b/build/bin/ram_all.bin index f49b20e..d5289cf 100644 Binary files a/build/bin/ram_all.bin and b/build/bin/ram_all.bin differ diff --git a/build/obj/build.nmap b/build/obj/build.nmap index 68d5b24..53253b0 100644 --- a/build/obj/build.nmap +++ b/build/obj/build.nmap @@ -2649,58 +2649,58 @@ 1003bfd0 T ODM_TXPowerTrackingCallback_ThermalMeter 1003c3dc T ODM_ResetIQKResult 1003c424 T ODM_GetRightChnlPlaceforIQK -1003c478 t __PHY_QueryBBReg_8195A_veneer -1003c480 t __rtw_set_fixed_ie_veneer -1003c488 t __ROM_ODM_CfoTrackingReset_veneer -1003c490 t __ROM_odm_CfoTrackingFlow_veneer -1003c498 t __rtw_secmicsetkey_veneer -1003c4a0 t __ROM_odm_GetDefaultCrytaltalCap_veneer -1003c4a8 t __HalI2SRead32_veneer -1003c4b0 t __rtw_get_wpa_ie_veneer -1003c4b8 t __wep_80211_decrypt_veneer -1003c4c0 t __rtw_parse_wpa_ie_veneer -1003c4c8 t __key_2char2num_veneer -1003c4d0 t __rtw_ieee802_11_parse_elems_veneer -1003c4d8 t __rtw_get_wps_ie_veneer -1003c4e0 t __AES_UnWRAP_veneer -1003c4e8 t __rtw_get_ie_veneer -1003c4f0 t __AES_WRAP_veneer -1003c4f8 t __wep_80211_encrypt_veneer -1003c500 t __rtw_set_ie_veneer -1003c508 t __tkip_80211_decrypt_veneer -1003c510 t __SpicWaitBusyDoneRtl8195A_veneer -1003c518 t __rt_arc4_crypt_veneer -1003c520 t __ROM_odm_EVMdbToPercentage_veneer -1003c528 t __rom_psk_PasswordHash_veneer -1003c530 t __rtw_secmicappend_veneer -1003c538 t __CmdDumpWord_veneer -1003c540 t __ROM_odm_FalseAlarmCounterStatistics_veneer -1003c548 t __tkip_80211_encrypt_veneer -1003c550 t __rtw_get_wps_attr_content_veneer -1003c558 t __HalI2SIntrCtrlRtl8195a_veneer -1003c560 t __rtw_get_wpa2_ie_veneer -1003c568 t __rtw_get_bit_value_from_ieee_value_veneer -1003c570 t __rtw_parse_wpa2_ie_veneer -1003c578 t __ROM_odm_QueryRxPwrPercentage_veneer -1003c580 t __rtw_seccalctkipmic_veneer -1003c588 t __rtw_get_rateset_len_veneer -1003c590 t __rt_md5_hmac_veneer -1003c598 t __CmdWriteWord_veneer -1003c5a0 t __rtw_check_network_type_veneer -1003c5a8 t __rom_psk_CalcGTK_veneer -1003c5b0 t __HalI2SWrite32_veneer -1003c5b8 t __aes_80211_encrypt_veneer -1003c5c0 t __rtw_secgetmic_veneer -1003c5c8 t __rom_psk_CalcPTK_veneer -1003c5d0 t __rtw_set_supported_rate_veneer -1003c5d8 t __rtw_get_sec_ie_veneer -1003c5e0 t __aes_80211_decrypt_veneer -1003c5e8 t __HalI2SClrAllIntrRtl8195a_veneer -1003c5f0 t __ROM_odm_SetCrystalCap_veneer -1003c5f8 t __PHY_SetBBReg_8195A_veneer -1003c600 t __rt_arc4_init_veneer -1003c608 t __rt_hmac_sha1_veneer -1003c610 t __phy_CalculateBitShift_veneer +1003c478 t __rtw_get_ie_veneer +1003c480 t __key_2char2num_veneer +1003c488 t __HalI2SClrAllIntrRtl8195a_veneer +1003c490 t __tkip_80211_decrypt_veneer +1003c498 t __ROM_odm_EVMdbToPercentage_veneer +1003c4a0 t __rtw_parse_wpa2_ie_veneer +1003c4a8 t __rtw_get_wpa_ie_veneer +1003c4b0 t __HalI2SIntrCtrlRtl8195a_veneer +1003c4b8 t __rom_psk_CalcPTK_veneer +1003c4c0 t __AES_UnWRAP_veneer +1003c4c8 t __HalI2SRead32_veneer +1003c4d0 t __rtw_get_wpa2_ie_veneer +1003c4d8 t __SpicWaitBusyDoneRtl8195A_veneer +1003c4e0 t __rtw_ieee802_11_parse_elems_veneer +1003c4e8 t __ROM_odm_FalseAlarmCounterStatistics_veneer +1003c4f0 t __rtw_secmicsetkey_veneer +1003c4f8 t __wep_80211_decrypt_veneer +1003c500 t __rtw_set_supported_rate_veneer +1003c508 t __rtw_get_rateset_len_veneer +1003c510 t __PHY_QueryBBReg_8195A_veneer +1003c518 t __aes_80211_decrypt_veneer +1003c520 t __wep_80211_encrypt_veneer +1003c528 t __ROM_odm_GetDefaultCrytaltalCap_veneer +1003c530 t __rtw_parse_wpa_ie_veneer +1003c538 t __ROM_odm_CfoTrackingFlow_veneer +1003c540 t __rtw_get_wps_ie_veneer +1003c548 t __rtw_secmicappend_veneer +1003c550 t __rtw_check_network_type_veneer +1003c558 t __CmdDumpWord_veneer +1003c560 t __rtw_set_fixed_ie_veneer +1003c568 t __CmdWriteWord_veneer +1003c570 t __rtw_get_sec_ie_veneer +1003c578 t __aes_80211_encrypt_veneer +1003c580 t __rtw_get_wps_attr_content_veneer +1003c588 t __phy_CalculateBitShift_veneer +1003c590 t __HalI2SWrite32_veneer +1003c598 t __rtw_secgetmic_veneer +1003c5a0 t __ROM_ODM_CfoTrackingReset_veneer +1003c5a8 t __rt_hmac_sha1_veneer +1003c5b0 t __PHY_SetBBReg_8195A_veneer +1003c5b8 t __ROM_odm_SetCrystalCap_veneer +1003c5c0 t __ROM_odm_QueryRxPwrPercentage_veneer +1003c5c8 t __rtw_set_ie_veneer +1003c5d0 t __rtw_get_bit_value_from_ieee_value_veneer +1003c5d8 t __rom_psk_PasswordHash_veneer +1003c5e0 t __rom_psk_CalcGTK_veneer +1003c5e8 t __tkip_80211_encrypt_veneer +1003c5f0 t __rt_arc4_init_veneer +1003c5f8 t __rt_arc4_crypt_veneer +1003c600 t __rt_md5_hmac_veneer +1003c608 t __rtw_seccalctkipmic_veneer +1003c610 t __AES_WRAP_veneer 1003c64d d __FUNCTION__.15285 1003ce10 d bitrate_table 1003cf3c d decoder_table