I was running 10.4.2 before.
I am having problems with the debugger in the new version. After changing the XN file to the new format (Packages required) and recompiling, the behaviour is not the same, or as good as the old version. Specifically when I debug code and hit a breakpoint, the debug view no longer shows all the threads which were running and are now suspended, it only shows the thread in which the breakpoint occurred. Also if one just runs with no breakpoints and subsequently presses "suspend" then an arbitrary thread is selected and this is the only one shown. One cannot see what any of the other threads were doing.
Also if one single steps this code snippet the delay takes about 12 seconds.
Code: Select all
#define ONE_MS_DLY 100000U
timer tmr;
unsigned t;
tmr :> t;
tmr when timerafter(t + ONE_MS_DLY) :> void;
I believe the L1 does not have hardware breakpoint support and I didn't set any watches. Why can it not run full speed? Many embedded platforms with Von Neumann architectures (shared code and data) simply patch the code at breakpoint locations with software interrupt instructions, replacing it with the original opcodes as required to execute subsequently when stepping.
The code runs fast in debug mode in Linux and works. It runs very slowly in debug mode in Windows and does not execute properly either. It hangs on I/O instructions or they take a very long time in the Windows version; it's behaving as if the L1 reference clock is not running properly.
I am using this XN config file.
I modified for an existing template from the IDE. The tools documentation says the ReferenceFrequency attribute is optional and defaults to 100MHz, which is fine.
Code: Select all
<Type>Board</Type>
<Name>XK-1 Development Board</Name>
<Declarations>
<Declaration>core stdcore[1]</Declaration>
</Declarations>
<Packages>
<Package id="0" Type="XS1-L1A-TQ128">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS1-L1A" Oscillator="13MHz" SystemFrequency="400MHz">
<Boot>
<Source Location="SPI:bootFlash"/>
</Boot>
<Core Number="0" Reference="stdcore[0]">
<!--
<Port Location="XS1_PORT_1I" Name="PORT_UART_RX"/>
<Port Location="XS1_PORT_1J" Name="PORT_UART_TX"/>
-->
<Port Location="XS1_PORT_1J" Name="PORT_BUT_A"/>
<Port Location="XS1_PORT_1K" Name="PORT_BUT_B"/>
<Port Location="XS1_PORT_1A" Name="PORT_SPI_MISO"/>
<Port Location="XS1_PORT_1B" Name="PORT_SPI_SS"/>
<Port Location="XS1_PORT_1C" Name="PORT_SPI_CLK"/>
<Port Location="XS1_PORT_1D" Name="PORT_SPI_MOSI"/>
<Port Location="XS1_PORT_32A" Name="PORT_CTL"/>
</Core>
</Node>
</Nodes>
</Package>
</Packages>
<Links>
</Links>
<ExternalDevices>
<Device NodeId="0" Core="0" Class="SPIFlash" Name="bootFlash" Type="AT25FS010">
<Attribute Name="PORT_SPI_MISO" Value="PORT_SPI_MISO"/>
<Attribute Name="PORT_SPI_SS" Value="PORT_SPI_SS"/>
<Attribute Name="PORT_SPI_CLK" Value="PORT_SPI_CLK"/>
<Attribute Name="PORT_SPI_MOSI" Value="PORT_SPI_MOSI"/>
</Device>
</ExternalDevices>
<JTAGChain>
<JTAGDevice NodeId="0"/>
</JTAGChain>
</Network>
Max.