Download presentation
Presentation is loading. Please wait.
Published bySpencer Bates Modified over 9 years ago
1
NET+OS 6 BSP How and why it was restructured Changes to memory map New features How to port to custom hardware
2
BSP Structuring Files broken up into S/W common to all platforms and S/W specific to a particular board Common files in src/netos/common Platform specific files in subdirectories in src/netos/platforms ARM7 init code in src/netos/arm7init Platform specific code simply since each set only supports a single platform
3
Supported Platforms ns7520_a: NS7520 development board net50_d: Old style NET-50 rev D board net50bga_a: Current NET-50 BGA board
4
Building a BSP Build from netos/src/bsp directory In GNU platform specified in command line to make file –make PLATFORM=net50bga_a In GHS platform specified by picking platform specific build file –Build net50bga.bld
5
Customizable Linker Scripts Linker scripts determine memory layout NET+OS 5 had linker scripts for each application NET+OS 5.1 had one set of linker scripts NET+OS 6 has one set of linker scripts for each platform Items likely to be changed are in one file for easy customization
6
More Efficient Memory Layout Earlier versions of NET+OS wasted most of memory Half was given to data, the other half to code Heap was fixed size NET+OS 6 packs code and data together so that memory is not wasted NET+OS 6 heap is automatically given all unused memory
7
Watchdog Driver Watchdog resets unit if it locks up Driver supports internal watchdog and TI TPS382X and MAXIM MAX6316- MAX6322 Beware that watchdog must not be turned on while in debugger
8
UDP Debug Driver New driver that makes printf output available over the network Useful for debugging if application H/W does not have any extra serial ports Output displayed on PC using UDPDB program supplied with NET+OS 6
9
Other New Features Simple serial driver for debugging BSP before real serial driver has been initialized Debug version of BSP that has asserts and extra printfs Ethernet MAC address is now stored in NVRAM 9 character serial numbers
10
Features…. Customers can change BSP_TICKS_PER_SECOND Ethernet driver has transmitter lockup recovery code Bootloader DHCP will generate XIDs based on Ethernet MAC addressed to avoid collisions with other units
11
Porting BSP to Customer H/W Step 1: Create a new platform directory –Copy a platform subdirectory similar to customer H/W –Give it an appropriate name Step 2: Edit configuration files bsp.h and bsp.c –Select device drivers, NVRAM type, system clock speed, and SYSCLK source –NS7520 development board uses external oscillator
12
Porting BSP to Customer H/W Step 3: Create new build files or update the make file –GHS: Create project build file in bsp directory –GHS: Update bsp.bld and subproject.bld files in new platform directory –GNU: Update makefile in bsp directory
13
Porting BSP to Customer H/W Step 4: Update the linker scripts –Edit customize.lx or customize.ldr –Set flash size for file system –Set size of flash and RAM –Set Maximum size of application image
14
Porting BSP to Customer H/W Step 5: Update cs.c and gpio.c –cs.c controls how chip selects are setup –Default code sets up CS0 for flash and CS1 and CS2 for RAM –gpio.c sets up GPIO ports and LED driver Step 6: Update NVRAM structure –Confusion in the field –Customers should update NVRAM structure to suite their application
15
Porting BSP to Customer H/W Step 7: Update error and exception handlers –Error handler called for fatal errors and blinks LEDs –Exception handler called for all unexpected exceptions and also blinks the LEDs –Can be configured to reset through bsp.h –Or modify as needed by the application
16
Porting BSP to Customer H/W Step 8: Create Debugger Scripts –Copy one of our scripts –Modify it for customer H/W memory setup Step 9: Debug in RAM –Verify H/W setup correctly by debugger script –Step through init.s and ncc_init.c
17
Porting BSP to Customer H/W Step 10: Debug in ROM –Verify processor bootstrap settings –Step through init.s and ncc_init.c –Verify that chip selects and GPIO are setup Step 11: Modify Startup Dialog –Usually customers have no need of it and it can be removed
18
Porting BSP to Customer H/W Step 12: Update the POST –Add tests for application H/W Step 13: Update ACE –ACE has a setup of callbacks for important events –Determine what to do if DHCP loses IP address (default behavior is to reset the unit) –Determine what to do if Auto-IP address is not routable (Auto-IP addresses are not routable)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.