diff --git a/configs/README.txt b/configs/README.txt index a4ce0ded195..b883163e718 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -519,6 +519,11 @@ configs/p112 Dave Brooks was successfully funded through Kickstarter for and another run of P112 boards in November of 2012. +configs/photon + A configuration for the Photon Wifi board from Particle Devices + (https://www.particle.io). This board features the STM32F205RGY6 MCU from + STMicro. + configs/pic32mx-starterkit This directory contains the port of NuttX to the Microchip PIC32 Ethernet Starter Kit (DM320004) with the Multimedia Expansion Board (MEB, DM320005). diff --git a/configs/photon/include/board.h b/configs/photon/include/board.h index fe832164d5d..ac5faed041e 100644 --- a/configs/photon/include/board.h +++ b/configs/photon/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/photon/include/board.h * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Simon Piriou * * Redistribution and use in source and binary forms, with or without @@ -163,7 +163,8 @@ #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -171,6 +172,7 @@ extern "C" { /************************************************************************************ * Public Function Prototypes ************************************************************************************/ + /************************************************************************************ * Name: stm32_boardinitialize * @@ -181,7 +183,7 @@ extern "C" { * ************************************************************************************/ -EXTERN void stm32_boardinitialize(void); +void stm32_boardinitialize(void); #undef EXTERN #if defined(__cplusplus) @@ -189,5 +191,4 @@ EXTERN void stm32_boardinitialize(void); #endif #endif /* __ASSEMBLY__ */ - #endif /* __CONFIG_PHOTON_INCLUDE_BOARD_H */ diff --git a/configs/photon/nsh/Make.defs b/configs/photon/nsh/Make.defs index 9e51a9fb88e..b6f58f29439 100644 --- a/configs/photon/nsh/Make.defs +++ b/configs/photon/nsh/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/photon/nsh/Make.defs # -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -114,4 +114,3 @@ HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe HOSTLDFLAGS = - diff --git a/configs/photon/nsh/defconfig b/configs/photon/nsh/defconfig index d399f0504e7..f331713db7a 100644 --- a/configs/photon/nsh/defconfig +++ b/configs/photon/nsh/defconfig @@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y # # Build Configuration # -CONFIG_APPS_DIR="../apps" +# CONFIG_APPS_DIR="../apps" CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set diff --git a/configs/photon/nsh/setenv.sh b/configs/photon/nsh/setenv.sh index b0522f0093b..dae53bd4787 100755 --- a/configs/photon/nsh/setenv.sh +++ b/configs/photon/nsh/setenv.sh @@ -1,7 +1,7 @@ #!/bin/bash # configs/photon/nsh/setenv.sh # -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -55,7 +55,7 @@ fi # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location -export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" #export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" # This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" @@ -70,6 +70,10 @@ export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ #export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" #export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin" +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" + # This is the Cygwin path to the location where I build the buildroot # toolchain. #export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" diff --git a/configs/photon/scripts/ld.script b/configs/photon/scripts/ld.script index 509d2abf903..01309314fef 100644 --- a/configs/photon/scripts/ld.script +++ b/configs/photon/scripts/ld.script @@ -1,7 +1,7 @@ /**************************************************************************** * configs/photon/scripts/ld.script * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2017 Gregory Nutt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,8 +43,8 @@ MEMORY { - flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K + flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K } OUTPUT_ARCH(arm) diff --git a/configs/photon/scripts/photon_dfu.ld b/configs/photon/scripts/photon_dfu.ld index 7041609e773..e59f501210c 100644 --- a/configs/photon/scripts/photon_dfu.ld +++ b/configs/photon/scripts/photon_dfu.ld @@ -1,7 +1,7 @@ /**************************************************************************** * configs/photon/scripts/photon_dfu.ld * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2017 Gregory Nutt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -40,8 +40,8 @@ MEMORY { - flash (rx) : ORIGIN = 0x08020000, LENGTH = 896K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K + flash (rx) : ORIGIN = 0x08020000, LENGTH = 896K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K } OUTPUT_ARCH(arm) diff --git a/configs/photon/src/Makefile b/configs/photon/src/Makefile index 4c822d03360..3413b18ba6b 100644 --- a/configs/photon/src/Makefile +++ b/configs/photon/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # configs/photon/src/Makefile # -# Copyright (C) 2011-2013, 2015-2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2017 Gregory Nutt. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/configs/photon/src/dfu_signature.c b/configs/photon/src/dfu_signature.c index c79df7470ee..a6eb0b49195 100644 --- a/configs/photon/src/dfu_signature.c +++ b/configs/photon/src/dfu_signature.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/photon/src/dfu_signature.c * - * Copyright (C) 2011-2012, 2015-2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Simon Piriou * * Redistribution and use in source and binary forms, with or without @@ -40,28 +40,38 @@ #include /**************************************************************************** - * Private Data + * Private Types + ****************************************************************************/ + +__attribute__((packed)) struct dfu_signature +{ + uint32_t linker_start_address; + uint32_t linker_end_address; + uint8_t reserved[4]; + uint16_t board_id; + uint8_t firmware_type1; + uint8_t firmware_type2; + uint8_t reserved2[8]; +}; + +/**************************************************************************** + * Public Data ****************************************************************************/ extern uint32_t _firmware_start; extern uint32_t _firmware_end; -__attribute__((packed)) struct dfu_signature { - uint32_t linker_start_address; - uint32_t linker_end_address; - uint8_t reserved[4]; - uint16_t board_id; - uint8_t firmware_type1; - uint8_t firmware_type2; - uint8_t reserved2[8]; -}; +/**************************************************************************** + * Private Data + ****************************************************************************/ -__attribute__((externally_visible, section(".dfu_signature"))) \ - const struct dfu_signature dfu_sign = { - (uint32_t)&_firmware_start, /* Flash image start address */ - (uint32_t)&_firmware_end, /* Flash image end address */ - {0, 0, 0, 0}, /* reserved */ - 6, /* Current board is photon */ - 4, 1, /* Firmware is "system-part1" */ - {0, 0, 0, 0, 0, 0, 0, 0} /* reserved */ +__attribute__((externally_visible, section(".dfu_signature"))) + const struct dfu_signature dfu_sign = +{ + (uint32_t)&_firmware_start, /* Flash image start address */ + (uint32_t)&_firmware_end, /* Flash image end address */ + {0, 0, 0, 0}, /* reserved */ + 6, /* Current board is photon */ + 4, 1, /* Firmware is "system-part1" */ + {0, 0, 0, 0, 0, 0, 0, 0} /* reserved */ }; diff --git a/configs/photon/src/photon.h b/configs/photon/src/photon.h index a26c7a0cce9..b2540c616a0 100644 --- a/configs/photon/src/photon.h +++ b/configs/photon/src/photon.h @@ -1,7 +1,7 @@ /**************************************************************************** * configs/photon/src/photon.h * - * Copyright (C) 2011-2012, 2015-2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Simon Piriou * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,6 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration *************************************************************/ /**************************************************************************** * Public Types diff --git a/configs/photon/src/stm32_appinit.c b/configs/photon/src/stm32_appinit.c index 294ca24c986..6fc07a0f513 100644 --- a/configs/photon/src/stm32_appinit.c +++ b/configs/photon/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/photon/src/stm32_appinit.c * - * Copyright (C) 2012, 2014, 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Simon Piriou * * Redistribution and use in source and binary forms, with or without diff --git a/configs/photon/src/stm32_boot.c b/configs/photon/src/stm32_boot.c index 648f1225b83..3b702089625 100644 --- a/configs/photon/src/stm32_boot.c +++ b/configs/photon/src/stm32_boot.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/photon/src/stm32_boot.c * - * Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2017 Gregory Nutt. All rights reserved. * Author: Simon Piriou * * Redistribution and use in source and binary forms, with or without