Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Add extension to image files build with GCC #392

Closed
wants to merge 11 commits into from

Conversation

josesimoes
Copy link
Contributor

Tthis makes the image files ready to be uploaded with ST-Link app, DFU manager or similar.

@smaillet-ms
Copy link
Member

Please squash your commits before posting a pull request so that the pull request contains only actual code change commits (e.g. no merges or reverts, etc...)

@smaillet-ms
Copy link
Member

In the future please submit an issue describing the problem and any proposed solution before submitting a pull request so that the issue and proposal may be discussed. I'm not particularly comfortable with this change. While it seems simple (just adding an extension) it has upstream implications that need to be considered. The build has generated these files without extensions (for good or ill) for the entire lifetime of NETMF. There are production systems with automated builds in place that expect the names to match and changing the names would break those. Adding the .bin can be a custom stage of the build for your case or, we could add a copy task to generate a copy of the files with the .bin extensions so we don't break anything that depends on the way it's always been done.

@smaillet-ms
Copy link
Member

In order to ensure that pull requests remain focused and easily rolled back if issues arrive please keep pull requests focused to exactly one issue. This change includes the CMSIS4.5 as well which should be a separate item unrelated to this one.

@josesimoes
Copy link
Contributor Author

@smaillet-ms undestood on both.
For the squash: I'm have a hard time with Git and its commands. I often screw up the commits and mix stuff between branches. Still learning my way... I do apologise for this.

Didn't realize that this change could have such heavy impact on all that. You are probably right...
I just got tired (for the 1M time) to have to add the extension to those image files so ST Link could take them and upload those to the flash.

Please disregard this PR.

@josesimoes josesimoes closed this Feb 18, 2016
@josesimoes josesimoes deleted the Add_extension_to_image_files_GCC branch February 25, 2016 09:02
smaillet-ms added a commit to smaillet-ms/netmf-interpreter that referenced this pull request Feb 26, 2016
smaillet-ms added a commit to smaillet-ms/netmf-interpreter that referenced this pull request Feb 27, 2016
…ndows (emulator and the new Windows native build this commit is adding)

- Added LONG and ULONG typedefs for compat. with WIn32 builds
- Fixed calls to Interlocked API declarations and calls to use LONG to match windows API (Its still a 32 bit integer so no functional change)
- updated Lwip and sockets vcxproj files to VS14
- Added DeviceCode\Targets\OS\Win32 for the native Win32 OS porting
- Added Solutions\Windows for native Win32 OS port solution
- Update solution file to VS14 as it wasn't saved for last commit
- reverting NETMF#392 as it was choking on malformed paths
- updated uvision files, git ignore and added readme.md for crypto
josesimoes pushed a commit to Eclo/netmf-interpreter that referenced this pull request Aug 4, 2016
…h NETMF_TARGET_LITTLE_ENDIAN

Update CMSIS 4.3.0 (it now includes RTX)

Cleaned up obsolete CMSIS include paths

- removed ITM Virtual port support from STM32F4 USART driver code

Added support for solution level extensibility for communication transports via generic transport interfaces
- Added new GENERIC_TRANSPORT
- Added new case to all COM redirector APIs to support GENERIC_TRANSPORT handles redirecting to GenericPort_xxx APIS
- Added new GenericPort_xxx APIS to lookup an interface in a table based on the port number and then call through the interface 's function pointer. This allows extensibility without requiring the definition of new transport types.
- added Common CortexMx ITM trace port channel 0 Generic port implementation
- Added support for using ITM0 Generic port to MCBSTM32F400

- modified DEBUG_TRACEXX to use debug_printf instead of hal_printf
- enabled CPU_InitializeCommunication() for all build configurations so debug and trace messages are available even in boot loaders.

- added missing cmsis_generic.h header for generic CMSIS library code use.

- replaced debug_printf calls with hal_printf calls for STM32F4 ethernet driver and WireProtocol.cpp  to keep clarity and consistency as network could be used for the Debug transport and DebugTextPort.
- restored DEBUG_TRACE so it uses hal_printf() instead of debug_printf so that it is useful for tracing issues even when the debug port isn't fully functional.

Removed not broken-out GPIO ports (used only A - E)

PH0 and PH1 deliberately omitted to keep the range continuous.

restored LWIP cc.h to use debug_printf as that is already set to extern "C" linkage. Changing hal_printf and everything that uses it to ensure it is always extern "C" as well was more work than seems worth it in this case.

Change DateTime.UtcNow.Kind from Local to Utc.

STM32F4DISCOVERY: TinyBooter uses ITM0

USART driver and PAL replaced with stubs.

Replaced 'tinyclr' with $(AssemblyName) in STM32F4DISCOVERY TinyCLR.proj

Synced with MCBSTM32F400, commit 78f5cb3.

- fixed assemblyinfo for Microsoft.VisualBasic.dll

-removed VS express SKU support as it causes issues with publishing to VS gallery and we don't need it anymore now that the VS community edition is freely available.
- fixed VS14 integration solution and projects to allow build and debug with VS experimental Hive

- added missing buildTasks project to depenencies for VS integration solution
- added missing WinUsb project reference for VS integration

Resolved circular dependency on build task projects
- removed project references to build task projects as they are needed to build other projects
- Create standalone solution to build the build task projects needed by other projects to allow building them independently of everything else. (NOTE: that msbuild.exe will normally leave an instance of itself running with all previously loaded tasks still loaded. Thus to build the build tasks it may be required to kill the pending msbuild.exe instance(s) to release the DLLs [It will timeout on it's own after a few minutes as well])

- Added standard project configuration settings to project files
- works ok in VS but busted on command line builds (the non standard nature of the current projects makes a mess of this - they need to be brought into standard project form)

restored direct <Reference> tags for assemblies since the command line build from Build_sdk won't process ProjectReferences properly (Fixing that is a complete re-write of the build)
- Added some dependency logging to the Common targets file to log child projects to help in tracking dependency issues.
- updated VSIX manifest to official RTM name of Visual Studio 2015

- Fixed solution configuration settings so it doesn't mix debug and release settings on a single solution configuration.
- Fixed WinUsb and Debugger CSPROJ files to set OutDir to the proper build output location

Fixed ConvertCOM_ComHandle() parameters (start from zero)

Revert "Fix DateTime Ticks to match the behavior of .NET"

This reverts commit 79a595a.

- updated cmsis_os_cpp.h to latest RTX data structure layout
- updated C++ support macros for timeres and mutex to maintain consistency between them for use. (e.g. 3 seperate macros, one to declare a member of a class, one for the constructor initializaion list and a third to be used in the constructor to perform final init/construction. This pattern ensures that the correct action is taken and allows for greater version implementation detal isolation. It is possible that the internals of the macro can change or even be empty in some cases and then in a new version change.
- forced all RAM regions propr to the LWIP init region to uncompressed, this is to work around the linker bug in the ARMCC tool chain. WHile that bug was fixed in the latest toolchain, not everyone has upgraded. In the next release of NETMF we'll reset the min requiremeents to include the fix - until then we'll keep the workaround.

Fix UTF8 to UTF16 conversion for special characters

- adding in support for legacy crypto, which was removed previously. Turns out it is still needed by TinyBooter/mfdeploy for firmware signature checks as a small footprint crypto lib.

- added default keys for signing. Users should create their own keys for security but providing a key prevents errors from hitting the build until they get to understanding that phase of things.

Revert "Restored Legacy Crypto support"

- Added code to tinybooter to dump out newkey, signature and current key on failure to verify signature on key updates to aid in diagnosing issues with Crypto library.
- fixed multiple issues of return or throw on smae line as conditional expression which make debugging difficult. (Some debuggers can't set breakpoints on line and column)
- for the crypto.lib project forced mapping MDK to the RVDS3.1 thumb2 crypto libraries.
- added more readable wire-protocal packet tracing, now prints the command id as a textual name along with a decoded form of the flags with textual names for all active flags to aid in debugging the communications.
- fixed DLLImports for the Crypto.dll to use CDecl calling convention to prevent issues with stack corruption and eliminate MDA exception while debugging.

- Fixed flash driver for MCBSTM32F400 to check for ready status after erase to ensure chip is in a valid state before continuing. Othereise the chip can get corrupted (particularly the Config sector)

- Added Addditional debug and ETW tracing for the NETMF wireprotocol in MFDeploy and VS integration.
- Added additional trace messaging support toe device side wire protocol to help in tracking any failures that might occur on a device.

- Fixed tracing to eprovide event code on WireProtocolTxHeader.

Revert "Adding support to provide more useful and actionalble diagnostics for Crypto libs and wire protocol debugging"

Updated string table inputs in Microsoft.SPOT.Support.Settings

StringTable data moved into separate file StringTableData.cpp (to avoid manual edits)

Now the data file can be replaced directly with the generated one.

Excluded generated strings from StringTable

$$method0x...
<PrivateImplementationDetails>{...guid}
__StaticArrayInitTypeSize=...

Updated string table data - generated from Microsoft.SPOT.Native.strings and mscorlib.strings

Deleted unused InitString() functions

TINYCLR_CREATE_STRINGTABLE symbol is not used anymore, never defined.

Added string table inputs information to StringTableData.cpp

Inline task PrependLinesToFile created to workaround ReadLinesFromFile limitations.

Deleted unused compile_stringtable.cmd script

The StringTable is now generated via 'buildstring' target in
Tools\Targets\Microsoft.SPOT.Support.Settings

Update the Interface tests to reflect the known issue related to NETMF#95

Fix TimerServiceTests

Fix http test for checking microsoft server

Eliminated VS14 build_sdk compiler warning C4474: 'wprintf' : too many arguments passed for format string

Eliminated VS14 build_sdk compiler warning C4477: 'wprintf' : format string '%f' requires an argument of type 'double', but variadic argument 1 has type 'CLR_INT32'

Eliminated VS14 build_sdk compiler warning C4477: 'wprintf' : format string '%g' requires an argument of type 'double', but variadic argument 1 has type 'CLR_INT64'

Set error on LINGER and DONTLINGER socket options

GroupTests encoding is ASCII.
Changed to Unicode for TM special character

STM32F4x9_Flash_driver.cpp also needs FLASH definition

Revert "STM32F4x9_Flash_driver.cpp also needs FLASH definition"

Fix the condition for setting static DNS

Fix NetInfo Tests

Fix http tests issues

- Added git ignore for the binary only crypto libraries so they don't get added into the tree
- Updated codesign certificate ids to current Microsoft SHA2 variants.

- adding in support for legacy crypto, which was removed previously. Turns out it is still needed by TinyBooter/mfdeploy for firmware signature checks as a small footprint crypto lib.

- added default keys for signing. Users should create their own keys for security but providing a key prevents errors from hitting the build until they get to understanding that phase of things.

- Added code to tinybooter to dump out newkey, signature and current key on failure to verify signature on key updates to aid in diagnosing issues with Crypto library.
- fixed multiple issues of return or throw on smae line as conditional expression which make debugging difficult. (Some debuggers can't set breakpoints on line and column)
- for the crypto.lib project forced mapping MDK to the RVDS3.1 thumb2 crypto libraries.
- added more readable wire-protocal packet tracing, now prints the command id as a textual name along with a decoded form of the flags with textual names for all active flags to aid in debugging the communications.
- fixed DLLImports for the Crypto.dll to use CDecl calling convention to prevent issues with stack corruption and eliminate MDA exception while debugging.

- Fixed flash driver for MCBSTM32F400 to check for ready status after erase to ensure chip is in a valid state before continuing. Othereise the chip can get corrupted (particularly the Config sector)

- Added Addditional debug and ETW tracing for the NETMF wireprotocol in MFDeploy and VS integration.
- Added additional trace messaging support toe device side wire protocol to help in tracking any failures that might occur on a device.

- Fixed tracing to eprovide event code on WireProtocolTxHeader.

Conflicts:
	crypto/dotNetMF.proj

Enabling time service for MCBStM32F400

- Enabled debug symbol information for release and RTM builds with MDK toolchain (It doesn't impact optimizations but allows for actual source debugging of release builds via JTAG debugger)

Added HttpClient Sample.
NOTE: The sample does not build with and is not included in the SDK. Rather the intention is that we will publish samples for NETMF in the Visual Studio Gallery. This allows updating and adding samples without requireing a new SDK. It also enables uses to find additional third party samples from a central place.

-Removed WSAEWOULDBLOCK as it's existence causes conditional checks to generate incorrect code for NETMF devices. (basically if WASEWOULDBLOCK exists AND is the same as EWOULDBLOCK on a non-windows targeted build, then EWOULDBLOCK gets treated as a fatal error instead of a bening notification)

- updated signing approvers
- updated reference to code signing object for latest object as installed on build server

update build signe to be a bit more soft on errors from service when waiting

Update README.md

Added additional hint path for code sign submitter so that external builds can succeed (even though signing isn't performed externally the component is needed to complete building the msbuild task dll)

Cleanup: Deleted unused <CustomSpecific> tag from .proj files

In solution projects it contains the solution name,
which is usually changed during the cloning process.

Cleanup: Deleted empty ProjectPath attributes from *proj files

Cleanup: Deleted <ProjectPath> from solution project files

enc28j60 problem fixed
when using with CMSIS RTOS

Fix Emulator hanging when using TLS/SSL

Implement fix suggested in NETMF#330
This is a fix that has been proposed by Xin Chen of the AMQP Lite project.
 See:
http://amqpnetlite.codeplex.com/wikipage?title=NETMF%20and%20TLS%2fSSL%20connection&referringTitle=Documentation

Update README.md

Improve code layout

Improve code layout for readability as requested by @smaillet-ms

fixed compile error through adding FLASH macro

Remove warning in graphics.cpp

Removed application signing

update gitignore to include readme and licenses from Crypto package

declare buffer with RSA_BLOCK_SIZE_BYTES

Add quotes to buildhelper paths to cope with embedded spaces and other special characters in the path

Set FLAVOR_WIN to match FLAVOR_DAT if it is not defined

Default FLAVOR_WIN to Release

Tweaks with general improvements and extra debug information

- replace gcc with g++ when compiling C++
- add extra flags when building in debug to output more data and symbols
- add several flags to improve compilation/link (because we are dealing with "bare metal" systems)
- add extra specs that pair with newlib nano targeting "bare metal" systems
- add debug flavor configurations for final linked file
(tested with GCC 5-2015-q4-major)

Change native BitConverter to not use Reinterpret Cast. This avoids non-aligned memory access errors.

- Added SetupVBRuntime Target to force the VB runtime and set the "MyType" property so that netmfvb projects can build and deploy properly

- Added Debug configuration suport to WinUSB to allow building Debug
- Fixed VB project templates to set Optimized property to false in debug configurations to enable debugging
- Modified VSProject.cs to test for mscorlib as an explicit dependency and if not present, add it so that various versions of VS and MSBUild common project systems work correctly.
- Added optional flavor flag in build_sdk to allow building the SDK as Debug. This helps in debugging working with the VS integration in debug mode as it builds all the dependencies in one pass.

- FIxed issues from Code review
- added Readme.md for the crypto libraries as the readme was left out from the original commit for the crypto libs

Rolling back changes from NETMF#399 and NETMF#396

- Added powershell script to aid in retrieving, and installing the CMSIS files
- Fixed incomplete comment

- reverts FLAVOR_WIN changes from NETMF#399 to fix build targeting windows (emulator and the new Windows native build this commit is adding)
- Added LONG and ULONG typedefs for compat. with WIn32 builds
- Fixed calls to Interlocked API declarations and calls to use LONG to match windows API (Its still a 32 bit integer so no functional change)
- updated Lwip and sockets vcxproj files to VS14
- Added DeviceCode\Targets\OS\Win32 for the native Win32 OS porting
- Added Solutions\Windows for native Win32 OS port solution
- Update solution file to VS14 as it wasn't saved for last commit
- reverting NETMF#392 as it was choking on malformed paths
- updated uvision files, git ignore and added readme.md for crypto

moved zip stream extraction out to seperate module to allow re-use in other build support scripts

- Added SPOCLIENT and SPOROOT variables to the BuildNETMF powershell module
- Added Install-BinTools powershell script to download ans install the required binary tools

- moved/renamed CMSIS installation script to root as Install-cmsis.ps1 to simplify finding it.

modified downloading scripts to use basic parsing to allow use in automated build server contexts

Added error level checks in build_sdk.cmd so that errors in building the SDK can stop the automated build and properly indicate an error status

- Fixed handling of BuildShare and BuildBranch to strip off quotes provided on the command line
- Fixed error checking as msbuild returns nonzero values that are greater than 0 on error.

- Added build_solution to simplify building solutions in new VSO builds
- Added conditional check to LightCmdLine options for light.exe to prevent ICE validation from choking on the build server when the account it runs under isn't an administrator account (Not a very good idea to run automated builds as the admin!)

- added setlocal and endlocal to Build_solutions so that it can be used repeatedly for various combinations in automated and local builds

fixed build_solution.cmd so it uses call to call set_env and, therefore continues to the next statement to build the solution

Adding DisAsmPE and preliminary docs on PE file format.

This sample utility and related documentation provides a standalone tool for understanding the structure of the NETMF PE files which represent an assembly as stored in flash on a device and used by the runtime to execute code. It is intentionally a fully standalone app that does not use any of the NETMF source code. The existing nETMF code for the PE file format has a heavy dependency on boththe desktop tools used to generate the PE files and the runtime internals itself, thus making isloated comprehension more difficult. This code is not intended as a production use tool, but rather as an informational tool for understanding the PE FILE format and limitations in isolation from the rest of the system. This should, hopefully, aid in comprehension of the rest of the code in the NETMF tools and interpreter itself.

Update git ignore to ignore TXT files generated by DisAsmPE

- refactored and simplified most of the code
- split out code to help make more sense of the structures

- Added dumping of basic headers for bitmap and font resources
- moved and renamed ASSER_STRUCT_IS_POD() macro to utilities.h
- Added skeleton MD files for TypeRef and AssemblyRef tables to help in testing links when pushed to GitHub

- Added top level readme.md

Add Gitter badge

split use of PLATFORM_WINDOWS into _MSC_VER, _WIN32, and PLATFORM_WINDOWS_EMULATOR as first step in reefactoring to allow cleaner builds and enable x86 based targets that aren't WIN32 based.

- Refactored headers and code to allow SDK to build using new _WIN32, PLATFORM_WINDOWS_EMULATOR split

Added checks for an existing installation to Install-Tools.ps1 and InstallCMSIS.ps1 so that the automated build doesn't need to install the files if they are already available.

Add NETMF logo

change color

- Fixed Test Framework MSI generation so it builds for the correct version
- added script and test list to run mscorlib tests as run on daily builds for verification of the core runtime engine

Use UINT32 to avoid signed/unsigned mismatch in ConfigurationSectorManager

Two for loops use int i which triggers a signed/unsigned warning when compared to
the UINT32 size parameter in ConfigurationSectorManager::WriteConfiguration(....)

Update PeFileFormat.md

Update AssemblyRefTableEntry.md

Update TypeRefTableEntry.md

Added NETMF interpreter data structure type names

updated PE FIle Format link to new wiki

Now points to new wiki instead of MD files in this directory.

removing - conent now on wiki

removing - conent now on wiki

removing - conent now on wiki

- added more comments
- moved tableIndex typedefs after the tableKindEnum so they make a bit more sense in context
- Added typedefs for the rest of the table index types
- Added index type argument to DECLARE_TABLEKIND macro and table_kind<> template to enable generation of greater type safety with templated types and methods.
- Added Final to POD structures and other types to enforce intent as sealed classes

- Fixed conditional check in TinyCLR_Runtime.h to include  || defined(TINYCLR_TRACE_MEMORY_STATS) that was accidentally stripped in conversion to standard _WIN32 checks

ssl_parse_certificate_internal.cpp has too many arguments to PRINTF in line 137. remove ignored parameter

Added STM32F429IDISCOVERY solution

Platform designer improvements from netmf 4.2 community branch

Change OneWire API to use a logical port number in the range 0..MAX_PORTNUM-1

OneWire constructor extended to accept a logical pin number in the range 0..MAX_PORTNUM-1
and check in range in subsequint calls to avoid reference outside array bounds.

support I2C2

Replace BIG_ENDIAN with NETMF_TARGET_BIG_ENDIAN and LITTLE_ENDIAN with NETMF_TARGET_LITTLE_ENDIAN

Fixes NETMF#481
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants