add phyplus_rel_1.4

update source for phyplus driver rel_1.4

update source  for phyplus driver rel 1.4

update source for phyplus driver 1.4

update phy6222 config files
This commit is contained in:
fenghang
2022-01-27 21:55:47 +08:00
committed by Xiang Xiao
parent 4207882cdc
commit 555d25633a
26 changed files with 979 additions and 118 deletions
@@ -33,8 +33,8 @@ CONFIG_NSH_FILEIOSIZE=64
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0
CONFIG_PTHREAD_STACK_DEFAULT=1536
CONFIG_RAM_SIZE=59392
CONFIG_RAM_START=0x1fff1c00
CONFIG_RAM_SIZE=59264
CONFIG_RAM_START=0x1fff1880
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
@@ -63,8 +63,8 @@ CONFIG_NSH_FILE_APPS=y
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0
CONFIG_PTHREAD_STACK_DEFAULT=1536
CONFIG_RAM_SIZE=59392
CONFIG_RAM_START=0x1fff1c00
CONFIG_RAM_SIZE=59264
CONFIG_RAM_START=0x1fff1880
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
+3 -1
View File
@@ -51,6 +51,8 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
CFLAGS += -ffunction-sections -fdata-sections
NXFLATLDFLAGS1 = -r -Wl,-d -Wl,-warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -Wl,-no-check-sections
LDNXFLATFLAGS = -e main -s 2048
@@ -62,4 +64,4 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g
endif
LDFLAGS += --gc-sections
+60 -11
View File
@@ -4,8 +4,8 @@ MEMORY
{
jumptbl (rwx) : ORIGIN = 0x1fff0000, LENGTH = 1K
gcfgtbl (rwx) : ORIGIN = 0x1fff0400, LENGTH = 1K
flash (rx) : ORIGIN = 0x1100e000, LENGTH = 256K
sram (rwx) : ORIGIN = 0x1fff1c00, LENGTH = 58K
flash (rx) : ORIGIN = 0x1100e000, LENGTH = 384K
sram (rwx) : ORIGIN = 0x1fff1880, LENGTH = 59264
}
OUTPUT_ARCH(arm)
@@ -62,10 +62,10 @@ SECTIONS
.data : {
_sdata = ABSOLUTE(.);
_stextram = ABSOLUTE(.);
*flash.o(.text .text.*)
*libarch.a:phy62xx_exception.o(.text .text.*)
*libarch.a:irq.o(.text.arm_ack_irq)
*phy62xx_ble_patch.o(.text .text.*)
*libarch.a:*flash.o(.text .text.*)
*libarch.a:phy62xx_exception.o(.text .text.*)
*libarch.a:irq.o(.text.arm_ack_irq)
*phy62xx_ble_patch.o(.text .text.*)
//*libarch.a:phy62xx_ble_patch.o(.text.ll_hw_go1)
//*libarch.a:phy62xx_ble_patch.o(.text.TIM1_IRQHandler1)
//*libarch.a:phy62xx_ble_patch.o(.text.LL_IRQHandler1)
@@ -88,8 +88,53 @@ SECTIONS
//*libarch.a:phy62xx_ble_patch.o(.text.ll_processBasicIRQ_SRX0)
//*libarch.a:phy62xx_ble_patch.o(.text.ll_hw_read_rfifo1)
*libphy6222_rf.a:patch.o(.text.ll_hw_go1)
*libphy6222_rf.a:patch.o(.text.TIM1_IRQHandler1)
*libphy6222_rf.a:patch.o(.text.LL_IRQHandler1)
*libphy6222_rf.a:patch.o(.text.rf_phy_change_cfg0)
*libphy6222_rf.a:patch.o(.text.rf_calibrate1)
*libphy6222_rf.a:patch.o(.text.l2capPocessFragmentTxData)
*libphy6222_rf.a:patch.o(.text.LL_SetDataLengh1)
*libphy6222_rf.a:patch.o(.text.llProcessTxData1)
*libphy6222_rf.a:patch.o(.text.ll_generateTxBuffer1)
*libphy6222_rf.a:patch.o(.text.ll_adptive_adj_next_time1)
*libphy6222_rf.a:patch.o(.text.llSecAdvAllow1)
*libphy6222_rf.a:patch.o(.text.ll_scheduler1)
*libphy6222_rf.a:patch.o(.text.osal_set_event1)
*libphy6222_rf.a:patch.o(.text.ll_processBasicIRQ_SRX)
*libphy6222_rf.a:patch.o(.text.ll_processBasicIRQ_secondaryAdvTRX)
*libphy6222_rf.a:patch.o(.text.ll_processBasicIRQ_ScanTRX)
*libphy6222_rf.a:patch.o(.text.llSlaveEvt_TaskEndOk1)
*libphy6222_rf.a:patch.o(.text.ll_processBasicIRQ_secondaryAdvTRX0)
*libphy6222_rf.a:patch.o(.text.ll_processBasicIRQ_ScanTRX0)
*libphy6222_rf.a:patch.o(.text.ll_processBasicIRQ_SRX0)
*libphy6222_rf.a:patch.o(.text.ll_hw_read_rfifo1)
*libphy6222_rf.a:patch.o(.text.LL_set_default_conn_params1)
*libphy6222_rf.a:patch.o(.text.llConnTerminate1)
*libphy6222_rf.a:patch.o(.text.config_RTC1)
*libphy6222_rf.a:patch.o(.text.wakeup_init1)
*libphy6222_rf.a:patch.o(.text.LL_ENC_AES128_Encrypt1)
*libphy6222_rf.a:patch.o(.text.LL_ENC_Encrypt1)
*libphy6222_rf.a:patch.o(.text.LL_ENC_Decrypt1)
*libphy6222_rf.a:patch.o(.text.ll_processBasicIRQ_secondaryScanSRX)
*libphy6222_rf.a:patch.o(.text.llProcessSlaveControlProcedures1)
*libphy6222_rf.a:patch.o(.text.llCalcMaxScanTime1)
*libphy6222_rf.a:patch.o(.text.LL_SetAdvControl1)
*libphy6222_rf.a:patch.o(.text.llSetupSecAdvEvt1)
*libphy6222_rf.a:patch.o(.text.ll_scheduler2)
*libphy6222_rf.a:patch.o(.text.llSetupNextSlaveEvent1)
*libapps.a:flash.c.*.o(.text .text.*)
*libapps.a:*.o(.text.drv_disable_irq1)
*libapps.a:*.o(.text.drv_enable_irq1)
*rf_phy_driver.o(.text.rf_phy_get_pktFoot)
*rf_phy_driver.o(.text.rf_phy_change_cfg0 )
*libphy6222_host.a:l2cap_util.o(.text.L2CAP_Fragment_SendDataPkt)
*libphy6222_host.a:l2cap_util.o(.text.l2capSegmentBuffToLinkLayer)
*libphy6222_host.a:l2cap_util.o(.text.l2capPocessFragmentTxData)
*libarch.a:phy62xx_ble_hcitl.o(.text.phy62xx_ble_init)
*libarch.a:phy62xx_ble_hcitl.o(.text.HCI_ProcessEvent1)
@@ -102,8 +147,8 @@ SECTIONS
*libarch.a:phy62xx_ble.o(.text.pplus_ble_recv_cb_h4 .text.pplus_ble_recv_cb_acl)
*libarch.a:phy62xx_ble.o(.text.pplus_ble_recv_msg )
*libarch.a:arm_doirq.o(.text.arm_doirq )
*libarch.a:arm_hardfault.o(.text.arm_hardfault )
*libarch.a:irq_dispatch.o(.text.irq_dispatch )
*libarch.a:phy62xx_hardfault.o(.text.arm_hardfault )
*libsched.a:irq_dispatch.o(.text.irq_dispatch )
*libsched.a:clock_initialize.o(.text.clock_timer)
*libsched.a:sched_processtimer.o(.text.nxsched_process_timer)
@@ -112,16 +157,20 @@ SECTIONS
*libsched.a:sched_yield.o(.text .text.*)
*libsched.a:sched_lock.o(.text .text.*)
*libsched.a:sched_unlock.o(.text .text.*)
*libdrivers.a:uart_bth4.o(.text.uart_bth4_pollnotify)
*libdrivers.a:uart_bth4.o(.text.uart_bth4_post)
*libdrivers.a:uart_bth4.o(.text.uart_bth4_receive)
*libarch.a:uart.o(.text .text.*)
*libarch.a:uart.o(.text .text.*)
*libmm.a:circbuf.o(.text .text.*)
*libc.a:lib_skipspace.o(.text .text.*)
*libc.a:lib_libvsprintf.o(.text .text.*)
*libc.a:lib_printf.o(.text .text.*)
*libc.a:lib_vfprintf.o(.text .text.*)
*libc.a:lib_skipspace.o(.text .text.*)
*libc.a:lib_sprintf.o(.text .text.*)
*libc.a:lib_strlen.o(.text .text.*)
*libc.a:lib_memcmp.o(.text .text.*)
@@ -129,7 +178,7 @@ SECTIONS
*libc.a:lib_memset.o(.text .text.*)
*libc.a:lib_memmove.o(.text .text.*)
*libapps.a:zblue.o(.text.k_yield .text.k_sleep .text.z_tick_get)
*libapps.a:zblue.o(.text.k_yield .text.k_sleep .text.z_tick_get)
_etextram = ABSOLUTE(.);
+2
View File
@@ -30,4 +30,6 @@ CSRCS += buttons.c
CSRCS += appinit.c
CSRCS += reset.c
include $(TOPDIR)/boards/Board.mk
+27 -5
View File
@@ -36,7 +36,18 @@
#include "phy6222.h"
#include "pplus_mtd_flash.h"
#ifdef CONFIG_PHY6222_BLE
#include "phy62xx_ble.h"
#endif
#ifdef CONFIG_WATCHDOG
#include "phyplus_wdt.h"
#endif
#ifdef CONFIG_TIMER
extern int phyplus_timer_initialize(FAR const char *devpath, int timer);
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -54,8 +65,8 @@
* Called from the NSH library
*
****************************************************************************/
#define PPLUS_MTD_START_OFFSET 0x40000 //start from 256k offset
#define PPLUS_MTD_SIZE 0x40000 //mtd size is 256k bytes
#define PPLUS_MTD_START_OFFSET 0x60000 //start from 384k offset
#define PPLUS_MTD_SIZE 0x20000 //mtd size is 128k bytes
int phy62xx_bringup(void)
{
@@ -103,6 +114,7 @@ int phy62xx_bringup(void)
}
#endif
#ifdef CONFIG_FS_LITTLEFS
struct mtd_dev_s *mtd =
@@ -125,16 +137,26 @@ int phy62xx_bringup(void)
/* Mount the LittleFS file system */
ret = nx_mount("/dev/mtd", "/mnt/lfs", "littlefs", 0,
"forceformat");
ret = nx_mount("/dev/mtd", "/data", "littlefs", 0,
"autoformat");
if (ret < 0)
{
syslog(LOG_ERR,
"ERROR: Failed to mount LittleFS at /mnt/lfs: %d\n", ret);
"ERROR: Failed to mount LittleFS at /data: %d\n", ret);
}
#endif
#ifndef CONFIG_PHY6222_SDK
#ifdef CONFIG_TIMER
phyplus_timer_initialize("/dev/timer3", 3);
#endif
#ifdef CONFIG_WATCHDOG
phyplus_wdt_initialize("/dev/watchdog0");
#endif
#endif
#ifdef CONFIG_PHY6222_BLE
ret = pplus_ble_initialize();
+58
View File
@@ -0,0 +1,58 @@
/****************************************************************************
* boards/arm/phy62xx/phy6222/src/reset.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/board.h>
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_reset
*
* Description:
* Reset board. Support for this function is required by board-level
* logic if CONFIG_BOARDCTL_RESET is selected.
*
* Input Parameters:
* status - Status information provided with the reset event. This
* meaning of this status information is board-specific. If not
* used by a board, the value zero may be provided in calls to
* board_reset().
*
* Returned Value:
* If this function returns, then it was not possible to power-off the
* board due to some constraints. The return value int this case is a
* board-specific reason for the failure to shutdown.
*
****************************************************************************/
int board_reset(int status)
{
up_systemreset();
return 0;
}