- Netduino Forums
- → dragonfly's Content
dragonfly's Content
There have been 12 items by dragonfly (Search limited from 19-April 23)
#5135 What Is this....?
Posted by dragonfly on 21 November 2010 - 05:52 PM in Netduino 2 (and Netduino 1)
#5084 Posts about Netduino Firmare v4.1.0.5
Posted by dragonfly on 20 November 2010 - 02:49 AM in Netduino 2 (and Netduino 1)
To use the patch:
1. Install porting kit and dev tools.
2. Copy firmware 4.1.0.5 into porting kit folder.
3. Download the attached archive, then unzip and copy the files into the porting kit installation folder.
4. Build and flash as normal.
While testing the build I noticed that compiling build.dirproj sometimes resulted in hundred of errors. Re-running the compile command consecutively (without using clean) eventually resolved the errors.
I have tested this by flashing the netduino with tinyboot and tinyclr, and deploying a very simple flashing light app. It has not been extensively tested and GCC 4.4 is not officially supported by the PK so you may come across some odd behavior.
This is my first patch ever so please be patient if it doesn't work perfectly - remember to back up your MicroFramework_PK folder before applying this patch. Any feedback is welcome.
Special thanks to sweetlilmre for his invaluable assistance
GCC 4.4
-------
83 712 TinyBooterDecompressor.bin
349 476 ER_FLASH (TinyClr.bin)
I have also compiled the same firmware with GCC 4.5 (I can post a patch if anyone is interested). There is a noticable speed improvement but at the cost of a larger boot size, but the TinyClr is 7KB smaller!
GCC 4.5
-------
91 300 TinyBooterDecompressor.bin
342 296 ER_FLASH (TinyClr.bin)
Attached Files
- netduino_v4.1.0.5_gcc4.4.zip 166.53KB 51 downloads
#5038 Netduino firmware with GCC 4.4
Posted by dragonfly on 18 November 2010 - 08:56 PM in Netduino 2 (and Netduino 1)
<Set Name="Deploy_BaseAddress" Value="0x00172348"/>
Compiling now gives a generic CLR_E_FAIL error for metadataprocessor for this command:
C:\MicroFrameworkPK_v4_1\BuildOutput\public\Release\Server\dll\MetaDataProcessor.exe -sign_file C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\FLASH\release\Netduino\bin\tinyclr.bin\ER_DAT C:\MicroFrameworkPK_v4_1\tools\bin\tinybooter_private_key.bin C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\FLASH\release\Netduino\bin\tinyclr.hex\ER_DAT.sig
... yet crazy-land does not end there, oh no. In trying to replicate everything I deleted the BuildOutput folder, then did:
msbuild /t:clean build.dirproj msbuild /t:build build.dirproj
The result, 442 Error(s). Meh, enough to make one crazy
I've attached the current firmware which I'm trying to build.
Edit:
GCC 4.4 compiles now for fw 4.1.0.5 - I have posted the patch on the thread for that firmware.
#4960 Using SPI to drive 8-bit parallel LCD via shift registers
Posted by dragonfly on 15 November 2010 - 09:46 PM in Project Showcase
Attached Files
- LCD_Shifter.zip 20.34KB 70 downloads
#4945 PS2 Keyboard timing woes
Posted by dragonfly on 15 November 2010 - 07:33 AM in Netduino 2 (and Netduino 1)
#4923 PS2 Keyboard timing woes
Posted by dragonfly on 14 November 2010 - 10:58 PM in Netduino 2 (and Netduino 1)
private void clockPort_OnInterrupt(uint data1, uint data2, DateTime time) { this.Clock(this.data); } private void dataPort_OnInterrupt(uint data1, uint data2, DateTime time) { this.data = (data2 == 0) ? false : true; }
It almost works but it still drops bits, especially when something is happening in the background.
According to this page,
, which implies that it may be possible to implement some sort of protocol to pause the keyboard while some processing is happening, possibly "driving" the pins by setting the pull-up/pull-down resistors, eg:The KBD Clock line can be used as a Clear to Send line. If the host takes the KBD Clock line low, the keyboard will buffer any data until the KBD Clock is released
this.dataPort.Resistor = Port.ResistorMode.PullDown; this.clockPort.Resistor = Port.ResistorMode.PullDown;, Although this throws a runtime exception. Other dead-ends include creating an OutputPort on the same pin as the InterruptPort, or using TristatePorts with interrupt handlers. Its puzzling that this is even an issue considering the keyboard should only be transmitting at ~25kHz.
#4915 How to write array with SPI
Posted by dragonfly on 14 November 2010 - 07:52 PM in General Discussion
#4905 How to write array with SPI
Posted by dragonfly on 14 November 2010 - 02:39 PM in General Discussion
I'm using SPI to drive a two 8-bit shift registers (74HC595) which in turn drive an LCD display (LM6029). The output loop seems a bit slow because the code needs to call spi.Write once for each output, eg:
SPI.Configuration config = new SPI.Configuration( Pins.GPIO_PIN_D10, false, 0, 0, false, true, 10, SPI.SPI_module.SPI1); spi = new SPI(config); ushort[] d = new ushort[1]; for (int i = 0; i < this.bufferSize; i++) { d[0] = buffer[i]; spi.Write(d); }
It seems it would be more efficient to be able to write the buffer array with one call to spi.Write and the method seems to be able to support it as it takes an array as the parameter, eg:
spi.Write(buffer);
Running the latter seems to result in only the last element of the array being output instead of all the elements being output sequentially.
I have compared this to Szymon's code here and he also calls write() once for each output instead of sending an array.
I'm just wondering what the the difference is between calling write with an array with one element in it, compared to calling write with an array of multiple values. I imagine calling write with one value multiple times would behave the same as calling write once but with multiple values.
#3932 Netduino firmware with GCC 4.4
Posted by dragonfly on 16 October 2010 - 07:11 PM in Netduino 2 (and Netduino 1)
"C:\MicroFrameworkPK_v4_1\Solutions\Netduino\TinyCLR\TinyCLR.proj" (default tar get) (1) -> (BuildAXF target) -> C:\MicroFrameworkPK_v4_1\tools\targets\Microsoft.SPOT.System.GCC.targets(306, 5): error MSB3073: The command ""c:\CodeSourcery\4.2\bin\arm-none-eabi-ld.exe" -static --gc-sections --no-warn-mismatch --library-path=C:\MicroFrameworkPK_v4 _1\BuildOutput\THUMB\GCC4.2\le\FLASH\release\Netduino\lib --library-path=C:\Mic roFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib --allow- multiple-definition -u ARM_Vectors -u _start --Map C:\MicroFrameworkPK_v4_1\Bui ldOutput\THUMB\GCC4.2\le\FLASH\release\Netduino\bin\tinyclr.map --output=C:\Mic roFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\FLASH\release\Netduino\bin\tinyc lr.axf --script=C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\FLASH\rele ase\Netduino\bin\tinyclr_scatterfile.ldf C:\MicroFrameworkPK_v4_1\BuildOutput\T HUMB\GCC4.2\le\FLASH\release\Netduino\obj\Solutions\Netduino\TinyCLR\tinyclr_da t.obj C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\FLASH\release\Netdui no\obj\Solutions\Netduino\TinyCLR\allocator.obj C:\MicroFrameworkPK_v4_1\BuildO utput\THUMB\GCC4.2\le\FLASH\release\Netduino\obj\Solutions\Netduino\TinyCLR\tin yclr.obj -( C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\rele ase\lib\Core.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA \release\lib\Hardware.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ ANY_MEDIA\release\lib\InterruptHandler.lib C:\MicroFrameworkPK_v4_1\BuildOutput \THUMB\GCC4.2\le\ANY_MEDIA\release\lib\I2C.lib C:\MicroFrameworkPK_v4_1\BuildOu tput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\IOPort.lib C:\MicroFrameworkPK_v4_1\ BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\RPC_stub.lib C:\MicroFramewor kPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\Serialization_stub.l ib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\D ebugger.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\rele ase\lib\Debugger_full.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ ANY_MEDIA\release\lib\Graphics_stub.lib C:\MicroFrameworkPK_v4_1\BuildOutput\TH UMB\GCC4.2\le\ANY_MEDIA\release\lib\CorLib.lib C:\MicroFrameworkPK_v4_1\BuildOu tput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\SPOT.lib C:\MicroFrameworkPK_v4_1\Bu ildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\SPOT_Crypto_stub.lib C:\MicroFr ameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\SPOT_Messaging _stub.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\releas e\lib\SPOT_Serialization_stub.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GC C4.2\le\ANY_MEDIA\release\lib\SPOT_Hardware.lib C:\MicroFrameworkPK_v4_1\BuildO utput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\Messaging.lib C:\MicroFrameworkPK_v 4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\CLRStartup.lib C:\MicroFr ameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\CRC.lib C:\Mic roFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\WireProtoc ol.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\l ib\SPOT_Hardware_SerialPort.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4 .2\le\ANY_MEDIA\release\lib\HeapPersistence.lib C:\MicroFrameworkPK_v4_1\BuildO utput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\Diagnostics.lib C:\MicroFrameworkPK _v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\Stream.lib C:\MicroFram eworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\SPOT_IO.lib C:\M icroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\ANY_MEDIA\release\lib\SPOT_Har dware_Usb.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le\FLASH\releas e\Netduino\lib\tmp_tinyclr.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4. 2\le\FLASH\release\Netduino\lib\InteropAssembliesTable.lib -) -( "c:\CodeSource ry\4.2\arm-none-eabi\lib\thumb\libm.a" "c:\CodeSourcery\4.2\arm-none-eabi\lib\t humb\libc.a" "c:\CodeSourcery\4.2\lib\gcc\arm-none-eabi\4.2.1\thumb\libgcc.a" - ) -( C:\MicroFrameworkPK_v4_1\tools\ads_v3_1\Lib\armlib\h_t.l C:\MicroFramework PK_v4_1\tools\ads_v3_1\Lib\armlib\c_t.l -)" exited with code 1. [C:\MicroFramew orkPK_v4_1\Solutions\Netduino\TinyCLR\TinyCLR.proj]
Edit:
The reported error in C:\MicroFrameworkPK_v4_1\tools\targets\Microsoft.SPOT.System.GCC.targets on line 306 is this:
<Exec Condition="'$(COMPILER_TOOL_VERSION)'=='GCC4.2'" Command="$(LINK) $(LINK_FLAGS) -u ARM_Vectors -u _start --Map $(EXEName).map --output=@(EXEOutput) --script=@(EXEScatterFile,' ') @(EXEInputs,' ') -( @(PlatformIndependentLibs-> '$(PLATFORM_INDEPENDENT_RELATIVE_LIB_DIR)%(FileName)%(Extension)',' ') $(LIB_DIR)\tmp_$(AssemblyName).$(LIB_EXT) @(InputLibs,' ') -) -( "$(GNU_LIB_DIR)\libm.a" "$(GNU_LIB_DIR)\libc.a" "$(GNU_LIBGCC_DIR)\$(LIBGCC)" -) -( $(ExtraLibs) - )"/>
Edit:
Finally got this to compile - so I thought I'd add it here to help all the newbies like me. Here's what I did.
1. Installed Porting Kit NoLibs and Porting Kit NetARM (did not install Porting Kit Crypto Pack)
2. Run the build and send the output to a file, eg:
msbuild Solutions\Netduino\dotnetmf.proj /t:build /t:flavor=release > log.txt
3. Open log.txt and copy the command which is causing the error, eg:
The command ".....copy everything between these quotes....." exited with code 1. [C:\MicroFramew orkPK_v4_1\Solutions\Netduino\TinyCLR\TinyCLR.proj]
4. Paste the command into the command prompt and hit enter - it runs and shows a different error message, one that you can actually read, eg:
c:\CodeSourcery\bin\arm-none-eabi-ld.exe: C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.2\le \FLASH\release\Netduino\bin\tinyclr.axf section ER_FLASH will not fit in region LR_FLASH c:\CodeSourcery\bin\arm-none-eabi-ld.exe: region LR_FLASH overflowed by 15744 bytes
5. From there it's pretty easy. In this case the solution is to adjust the memory which is described here.
6. Profit!
I'm going to try the same approach with GCC4.4 and see if I can get that to work.
Edit:
Making progress - build.dirproj builds without errors using GCC 4.4, however building the Netduino solution results in this error:
tmp_Tinybooter.lib(tinyhal.obj): In function `HAL_Initialize()': tinyhal.cpp:(.text._Z14HAL_Initializev+0x104): undefined reference to `DeploymentTransport_Initialize()'
#3929 Netduino firmware with GCC 4.4
Posted by dragonfly on 16 October 2010 - 02:07 PM in Netduino 2 (and Netduino 1)
#3921 Netduino firmware with GCC 4.4
Posted by dragonfly on 16 October 2010 - 08:30 AM in Netduino 2 (and Netduino 1)
Here's what I've installed so far:
- Installed Visual C# Express 2010 and Visual C++ Express 2010
- Installed MicroFrameworkPK, MicroFrameworkPK (ARM Network Pack), MicroFrameworkPK (Crypto Pack) into MicroFrameworkPK_v4_1 folder
- Installed code sourcery arm-2010q1-188-arm-none-eabi downloaded from here http://www.codesourc...tal/release1294
- Copied Netduino Firmware v4.1.0 (patch 2) into the MicroFrameworkPK_v4_1 folder
- Download, unzipped the attachment from this thread and copied files into MicroFrameworkPK_v4_1 folder
At the command prompt:
- cd \MicroFrameworkPK_v4_1
- setenv_gcc4.4 c:\CodeSourcery
- msbuild Solutions\Netduino\dotnetemf.proj /p:flavor=release
Here's the error:
[code=auto:0]"C:\MicroFrameworkPK_v4_1\Solutions\Netduino\dotnetmf.proj" (default target) (1
) ->
"C:\MicroFrameworkPK_v4_1\Solutions\Netduino\TinyCLR\TinyCLR.proj" (Build targe
t) (84) ->
(BuildAXF target) ->
C:\MicroFrameworkPK_v4_1\tools\targets\Microsoft.SPOT.System.GCC.targets(343,
5): error MSB3073: The command ""c:\CodeSourcery\bin\arm-none-eabi-ld.exe" -st
atic --gc-sections --no-warn-mismatch --library-path=C:\MicroFrameworkPK_v4_1\B
uildOutput\THUMB\GCC4.4\le\FLASH\release\Netduino\lib --library-path=C:\MicroFr
ameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib --allow-mult
iple-definition -u ARM_Vectors -u _start --Map C:\MicroFrameworkPK_v4_1\BuildOu
tput\THUMB\GCC4.4\le\FLASH\release\Netduino\bin\tinyclr.map --output=C:\MicroFr
ameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\FLASH\release\Netduino\bin\tinyclr.a
xf --script=C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\FLASH\release\
Netduino\bin\tinyclr_scatterfile.ldf C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB
\GCC4.4\le\FLASH\release\Netduino\obj\Solutions\Netduino\TinyCLR\tinyclr_dat.ob
j C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\FLASH\release\Netduino\o
bj\Solutions\Netduino\TinyCLR\allocator.obj C:\MicroFrameworkPK_v4_1\BuildOutpu
t\THUMB\GCC4.4\le\FLASH\release\Netduino\obj\Solutions\Netduino\TinyCLR\tinyclr
.obj -( C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\
lib\Core.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\rel
ease\lib\Hardware.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_
MEDIA\release\lib\InterruptHandler.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THU
MB\GCC4.4\le\ANY_MEDIA\release\lib\I2C.lib C:\MicroFrameworkPK_v4_1\BuildOutput
\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\IOPort.lib C:\MicroFrameworkPK_v4_1\Buil
dOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\RPC_stub.lib C:\MicroFrameworkPK_
v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\Serialization_stub.lib C
:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\Debug
ger.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\
lib\Debugger_full.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_
MEDIA\release\lib\Graphics_stub.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\
GCC4.4\le\ANY_MEDIA\release\lib\CorLib.lib C:\MicroFrameworkPK_v4_1\BuildOutput
\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\SPOT.lib C:\MicroFrameworkPK_v4_1\BuildO
utput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\SPOT_Crypto_stub.lib C:\MicroFramew
orkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\SPOT_Messaging_stu
b.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\li
b\SPOT_Serialization_stub.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4
\le\ANY_MEDIA\release\lib\SPOT_Hardware.lib C:\MicroFrameworkPK_v4_1\BuildOutpu
t\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\Messaging.lib C:\MicroFrameworkPK_v4_1\
BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\CLRStartup.lib C:\MicroFramew
orkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\CRC.lib C:\MicroFr
ameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\WireProtocol.l
ib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\S
POT_Hardware_SerialPort.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\l
e\ANY_MEDIA\release\lib\HeapPersistence.lib C:\MicroFrameworkPK_v4_1\BuildOutpu
t\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\Diagnostics.lib C:\MicroFrameworkPK_v4_
1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\Stream.lib C:\MicroFramewor
kPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\SPOT_IO.lib C:\Micro
FrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\ANY_MEDIA\release\lib\SPOT_Hardwar
e_Usb.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le\FLASH\release\Ne
tduino\lib\tmp_tinyclr.lib C:\MicroFrameworkPK_v4_1\BuildOutput\THUMB\GCC4.4\le
\FLASH\release\Netduino\lib\InteropAssembliesTable.lib -) -( "c:\CodeSourcery\a
rm-none-eabi\lib\thumb\libm.a" "c:\CodeSourcery\arm-none-eabi\lib\thumb\libc.a"
"c:\CodeSourcery\lib\gcc\arm-none-eabi\4.4.1\thumb\libgcc.a" -) -( C:\MicroFra
meworkPK_v4_1\tools\ads_v3_1\Lib\armlib\h_t.l C:\MicroFrameworkPK_v4_1\tools\ad
s_v3_1\Lib\armlib\c_t.l -)" exited with code 1. [C:\MicroFrameworkPK_v4_1\Solut
ions\Netduino\TinyCLR\TinyCLR.proj[code=auto:0]
Any ideas?
#1840 BitBanger Driver
Posted by dragonfly on 06 September 2010 - 09:21 AM in Netduino 2 (and Netduino 1)
- Netduino Forums
- → dragonfly's Content
- Privacy Policy