This commit is contained in:
pvvx 2017-09-25 19:31:57 +03:00
parent 7ce370d5b3
commit b075b615b6
26 changed files with 410 additions and 119 deletions

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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
#endif

View file

@ -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)

View file

@ -56,14 +56,14 @@ struct v4l2_prio_state {
/*
enum v4l2_priority {
V4L2_PRIORITY_UNSET = 0, // 不初始化
V4L2_PRIORITY_BACKGROUND = 1, // 背景
V4L2_PRIORITY_INTERACTIVE = 2, // 互動
V4L2_PRIORITY_RECORD = 3, // 紀錄
V4L2_PRIORITY_UNSET = 0, // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>l<EFBFBD><EFBFBD>
V4L2_PRIORITY_BACKGROUND = 1, // <EFBFBD>I<EFBFBD><EFBFBD>
V4L2_PRIORITY_INTERACTIVE = 2, // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
V4L2_PRIORITY_RECORD = 3, // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
};
Multiple Opens操作device同時被多個thread (i.e open())
使prios[4]
ɬ<EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>O<EFBFBD><EFBFBD><EFBFBD>FMultiple Opens<EFBFBD>ާ@<EFBFBD>A<EFBFBD><EFBFBD>i<EFBFBD>H<EFBFBD><EFBFBD><EFBFBD>device<EFBFBD>P<EFBFBD>ɳQ<EFBFBD>h<EFBFBD><EFBFBD>thread <EFBFBD><EFBFBD><EFBFBD>}(i.e open())
<EFBFBD>ݭn<EFBFBD>γo<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>h<EFBFBD>Ϥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӿާ@<EFBFBD>󭫭n<EFBFBD>A<EFBFBD>ϥΪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>u<EFBFBD><EFBFBD><EFBFBD>ŧO<EFBFBD>A<EFBFBD><EFBFBD>prios[4]<EFBFBD>N<EFBFBD>[<EFBFBD>@<EFBFBD>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);

View file

@ -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 dirtypenrsize parameters to one cmd parameter
* combine the four dir<EFBFBD>Atype<EFBFBD>Anr<EFBFBD>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位于p指向的long地址32位空?
unsigned long result = offset & ~(BITS_PER_LONG-1); // offset是第result?4字?
const unsigned long *p = addr + BIT_WORD(offset); // offset<EFBFBD><EFBFBD>_p<EFBFBD><EFBFBD><EFBFBD>V<EFBFBD><EFBFBD>long<EFBFBD>a<EFBFBD>}32<33><32><EFBFBD>?
unsigned long result = offset & ~(BITS_PER_LONG-1); // offset<EFBFBD>O<EFBFBD><EFBFBD>result?4<>r?
unsigned long tmp;
if (offset >= size)
return size;
size -= result; // ?整32位整倍?上
offset %= BITS_PER_LONG; // offset位于32位的第几位
if (offset) { // offset不在一?long?据的第0位上,在1-31位中[luther.gliethttp]
size -= result; // ?<EFBFBD><EFBFBD>32<EFBFBD><EFBFBD>㭿?<3F>W
offset %= BITS_PER_LONG; // offset<EFBFBD><EFBFBD>_32<EFBFBD><EFBFBD>ĤL<EFBFBD><EFBFBD>
if (offset) { // offset<EFBFBD><EFBFBD><EFBFBD>b<EFBFBD>@?long?<3F>u<EFBFBD><75><EFBFBD><EFBFBD>0<EFBFBD><30>W,<2C>b1-31<33>[luther.gliethttp]
tmp = *(p++);
tmp |= ~0UL >> (BITS_PER_LONG - offset); // ?0-offset?据填充上1.
if (size < BITS_PER_LONG) // 不足32bits
tmp |= ~0UL >> (BITS_PER_LONG - offset); // ?0-offset?<EFBFBD>u<EFBFBD><EFBFBD>R<EFBFBD>W1.
if (size < BITS_PER_LONG) // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>32bits
goto found_first;
if (~tmp) // 取非非0?明含有0值
if (~tmp) // <EFBFBD><EFBFBD><EFBFBD>D<EFBFBD>D0?<3F><><EFBFBD>t<EFBFBD><74>0<EFBFBD><30>
goto found_middle;
size -= BITS_PER_LONG; // 如果上面~tmp等于0,那么?明?*p?据?32位全1.[luther.gliethttp]
size -= BITS_PER_LONG; // <EFBFBD>p<EFBFBD>G<EFBFBD>W<EFBFBD><EFBFBD>~tmp<6D><70><EFBFBD>_0,<2C><><EFBFBD>\?<3F><>?*p?<3F>u?32<33><32><EFBFBD>1.[luther.gliethttp]
result += BITS_PER_LONG;
}
while (size & ~(BITS_PER_LONG-1)) { // 好了,?行到?里,我?的offset已??在4字?的第0位上,下面?行
if (~(tmp = *(p++))) // 4字?快速查?.如果~tmp非0,?明?32位?据中含有0?据,找到.[luther.gliethttp]
while (size & ~(BITS_PER_LONG-1)) { // <EFBFBD>n<EFBFBD>F,?<3F><><EFBFBD>?<3F><>,<2C><>?<3F><>offset<65>w??<3F>b4<62>r?<3F><><EFBFBD><EFBFBD>0<EFBFBD><30>W,<2C>U<EFBFBD><55>?<3F><>
if (~(tmp = *(p++))) // 4<EFBFBD>r?<3F>ֳt<D6B3>d?.<2E>p<EFBFBD>G~tmp<6D>D0,?<3F><>?32<33><32>?<3F>u<EFBFBD><75><EFBFBD>t<EFBFBD><74>0?<3F>u,<2C><><EFBFBD>.[luther.gliethttp]
goto found_middle;
result += BITS_PER_LONG; // 到下一?4字?空?
size -= BITS_PER_LONG; // ?少4字??据
result += BITS_PER_LONG; // <EFBFBD><EFBFBD>U<EFBFBD>@?4<>r?<3F><>?
size -= BITS_PER_LONG; // ?<EFBFBD><EFBFBD>4<EFBFBD>r??<3F>u
}
if (!size) // size等于0,?明首先size等于4字?整倍?,其次所有?据已?查完,
return result; // 所有?据全部?1,?有??0位,result等于size.[luther.gliethttp]
tmp = *p; // size不是32位整倍?,?剩几?bit?有?查,???行下面?查工作.[luther.gliethtp]
if (!size) // size<EFBFBD><EFBFBD><EFBFBD>_0,?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>size<7A><65><EFBFBD>_4<5F>r?<3F>㭿?,<2C><EFBFBD>Ҧ<EFBFBD>?<3F>u<EFBFBD>w?<3F>d<EFBFBD><64>,
return result; // <EFBFBD>Ҧ<EFBFBD>?<3F>u<EFBFBD><75><EFBFBD><EFBFBD>?1,?<3F><>??0<><30>,result<6C><74><EFBFBD>_size.[luther.gliethttp]
tmp = *p; // size<EFBFBD><EFBFBD><EFBFBD>O32<EFBFBD><EFBFBD>㭿?,?<3F>ѤL?bit?<3F><>?<3F>d,???<3F><>U<EFBFBD><55>?<3F>d<EFBFBD>u<EFBFBD>@.[luther.gliethtp]
found_first:
tmp |= ~0UL << size; // ?在0-size?有效?据,size-31?未使用空?,所以先?size-31置成全1.
if (tmp == ~0UL) /* Are any bits zero? */ // 如果tmp全1,那么?明就?找找1?
return result + size; /* Nope. */ // result+size就等于函??入的??size大小.[luther.gliethttp]
tmp |= ~0UL << size; // ?<EFBFBD>b0-size?<3F><><EFBFBD><EFBFBD>?<3F>u,size-31?<3F><><EFBFBD>ϥΪ<CFA5>?,<2C>ҥH<D2A5><48>?size-31<33>m<EFBFBD><6D><EFBFBD><EFBFBD>1.
if (tmp == ~0UL) /* Are any bits zero? */ // <EFBFBD>p<EFBFBD>Gtmp<EFBFBD><EFBFBD>1,<2C><><EFBFBD>\?<3F><><EFBFBD>N?<3F><><EFBFBD>1?
return result + size; /* Nope. */ // result+size<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>_<EFBFBD><EFBFBD>??<3F>J<EFBFBD><4A>??size<7A>j<EFBFBD>p.[luther.gliethttp]
found_middle:
return result + ffz(tmp); // 我?在32位?据的0-31中??必定存在0位值,?算他是第几位.[luther.gliethttp]
return result + ffz(tmp); // <EFBFBD><EFBFBD>?<3F>b32<33><32>?<3F>u<EFBFBD><75>0-31<33><31>??<3F><><EFBFBD>w<EFBFBD>s<EFBFBD>b0<62><30><EFBFBD>,?<3F><>L<EFBFBD>O<EFBFBD>ĤL<C4A4><4C>.[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_*/
#endif /*_V4L2_OSDEP_H_*/

View file

@ -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

View file

@ -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);

View file

@ -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.

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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
};

View file

@ -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!")
}

View file

@ -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")

View file

@ -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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -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