Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

dragonfly

Member Since 03 Sep 2010
Offline Last Active Feb 22 2011 07:59 AM
-----

Posts I've Made

In Topic: What Is this....?

21 November 2010 - 05:52 PM

This looks similar to what the PIC's use, and the AVR uses this for debugging with the DebugWire interface using Atmels JTAG ICE MK2. It would be interesting to know if this header is wired to the correct pins which would enable hardware debugging. On the other hand the DebugWire protocol is a secret which means you have to use the right JTAG. The evaluation kit seems to be about the same price as the JTAG so it may not be economical unless you happen to have one of them lying around (or someone reverse-engineers the protocol).

In Topic: Posts about Netduino Firmare v4.1.0.5

20 November 2010 - 02:49 AM

Attached is a patch to enable compiling firmware v.4.1.0.5 using gcc 4.4. The patch is based on the original gcc 4.4 patch by jeremy. The patch includes jeremy's bug fix to metadataprocessor, and the necessary memory layout adjustments.

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 :unsure: - remember to back up your MicroFramework_PK folder before applying this patch. Any feedback is welcome.

Special thanks to sweetlilmre for his invaluable assistance B)


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)

In Topic: Netduino firmware with GCC 4.4

18 November 2010 - 08:56 PM

With help from sweetlilmre I've manged to merge Jeremy's GCC 4.4 path with the Netduino 4.1.0.5 firmware. The solutions compiles with the predictable result that LR_FLASH overflowed by 648 bytes. I updated BLOCKRANGE with the example posted above and edited scatterfile_tinyclr_gcc4.4.xml as follows:

<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 :blink:

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.

In Topic: PS2 Keyboard timing woes

15 November 2010 - 07:33 AM

Freds: Ah that makes some sense, I'll try that it out ;) Although if that is the case then this is still a dead-end as the lines need to be pulled low to set the keyboard to receive mode. Would still be good to see if it works though. I saw another page (can't remember where off-hand) which hinted that a serial port might do the job. On one hand the data looks like standard serial data (stop bit, start bit, parity bit), on the other hand there's no real handshaking so it would be a bit of a guess getting the right connection settings as to speed and so on. Also, setting the keyboard to receive mode might also be a problem as it requires pulling the clock and data lines low which may or may not be possible using a serial port. Still worth investigating.

In Topic: PS2 Keyboard timing woes

14 November 2010 - 10:58 PM

Seem to be having some success (not alot though) using one interrupt per pin, eg:

        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,

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

, 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:
            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.

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.