File tree Expand file tree Collapse file tree
variants/discovery_f407/ld Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,13 +30,13 @@ void setup() {
3030 Ethernet.begin (mac);
3131
3232 Serial.print (" localIP: " );
33- Serial.println (Ethernet.localIP ());
33+ Serial.println (Ethernet.localIP (). toString () );
3434 Serial.print (" subnetMask: " );
35- Serial.println (Ethernet.subnetMask ());
35+ Serial.println (Ethernet.subnetMask (). toString () );
3636 Serial.print (" gatewayIP: " );
37- Serial.println (Ethernet.gatewayIP ());
37+ Serial.println (Ethernet.gatewayIP (). toString () );
3838 Serial.print (" dnsServerIP: " );
39- Serial.println (Ethernet.dnsServerIP ());
39+ Serial.println (Ethernet.dnsServerIP (). toString () );
4040
4141 next = 0 ;
4242}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ email=Norbert Truchsess <norbert.truchsess@t-online.de>
44sentence =Ethernet library for ENC28J60
55paragraph =implements the same API as stock Ethernet-lib. Just replace the include of Ethernet.h with UIPEthernet.h
66url =https://github.com/ntruchsess/arduino_uip
7- architectures =STM32F1
7+ architectures =STM32F4
88version =1.04
99dependencies =
1010core-dependencies =arduino (>=1.5.0)
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ static byte selectPin;
5757
5858void Enc28J60Network::init (uint8_t * macaddr)
5959{
60+ uint32 timeout = 0 ;
6061 MemoryPool::init (); // 1 byte in between RX_STOP_INIT and pool to allow prepending of controlbyte
6162 // initialize I/O
6263 // ss as output:
@@ -100,8 +101,12 @@ void Enc28J60Network::init(uint8_t* macaddr)
100101#ifdef ENC28J60DEBUG
101102 Serial.println (" ENC28J60::initialize / before readOp(ENC28J60_READ_CTRL_REG, ESTAT)" );
102103#endif
103- while (!readOp (ENC28J60_READ_CTRL_REG, ESTAT) & ESTAT_CLKRDY)
104- ;
104+ while (!readOp (ENC28J60_READ_CTRL_REG, ESTAT) & ESTAT_CLKRDY) {
105+ if (++timeout > 100000 ) {
106+ Serial.println (" ENC28J60::initialize TIMEOUT !!!\r\n " );
107+ return ;
108+ }
109+ }
105110#ifdef ENC28J60DEBUG
106111 Serial.println (" ENC28J60::initialize / after readOp(ENC28J60_READ_CTRL_REG, ESTAT)" );
107112#endif
Original file line number Diff line number Diff line change 2828#include < SPI.h>
2929#include " mempool.h"
3030
31- // #define ENC28J60_CONTROL_CS SS
32- // #define SPI_MOSI MOSI
33- // #define SPI_MISO MISO
34- // #define SPI_SCK SCK
35- // #define SPI_SS SS
3631
32+ #ifdef ARDUINO_STM32F4_NETDUINO2PLUS
3733#define ENC28J60_CONTROL_CS PC8
38- // #define SPI_MOSI PA7
39- // #define SPI_MISO PA6
40- // #define SPI_SCK PA5
41- // #define SPI_SS PA8
34+ #else
35+ #define ENC28J60_CONTROL_CS SPI.nssPin()
36+ #endif
4237
4338#define UIP_RECEIVEBUFFERHANDLE 0xff
4439
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ compiler.define=-DARDUINO=
3232# this can be overriden in boards.txt
3333build.cpu_flags=
3434build.hs_flag=
35- build.common_flags=
35+ build.common_flags=-mthumb -D__STM32F4__
3636build.extra_flags= {build.cpu_flags} {build.hs_flag} {build.common_flags}
3737
3838# These can be overridden in platform.local.txt
@@ -125,10 +125,11 @@ tools.serial_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.alt
125125
126126# STLINK/V2
127127
128- tools.stlink.cmd=stlink
128+ tools.stlink.cmd=stlink_upload
129129tools.stlink.cmd.windows=stlink_upload.bat
130- #tools.stlink.cmd.linux=
130+ #tools.stlink.cmd.linux=stlink_upload
131131tools.stlink.path={runtime.hardware.path}/tools/win
132+ tools.stlink.path.linux={runtime.hardware.path}/tools/linux/
132133tools.stlink.upload.params.verbose=-d
133134tools.stlink.upload.params.quiet=
134135tools.stlink.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
Original file line number Diff line number Diff line change 11/*
2- * aeroquad32 (STM32F103VET6, high density) linker script for
2+ * STM32F4xx high density linker script for
33 * JTAG (bare metal, no bootloader) builds.
44 */
55
66MEMORY
77{
8- ram (rwx) : ORIGIN = 0x20000000 , LENGTH = 64K
9- rom (rx) : ORIGIN = 0x08000000 , LENGTH = 512K
8+ ram (rwx) : ORIGIN = 0x20000000 , LENGTH = 112K
9+ rom (rx) : ORIGIN = 0x08000000 , LENGTH = 1024K
1010}
1111
1212/* GROUP(libcs3_stm32_high_density.a) */
You can’t perform that action at this time.
0 commit comments