ESP8266 back-end build process for "ClientUDP.esp"

Discussion of issues related to writing ZBasic applications for targets other than ZX devices, i.e. generic targets.
Post Reply
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

ESP8266 back-end build process for "ClientUDP.esp"

Post by FFMan »

I loaded and ran the hello world successfully on a modemcu, i then tried the supplied client UDP but i get back end build errors.

I installed the latest zbasic download but still have the issue.

should this example compile without any modification as a starting point ?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: ESP8266 back-end build process for "ClientUDP.esp&q

Post by dkinzer »

FFMan wrote:should this example compile without any modification as a starting point ?
Yes, it should but a change in the compiler since the example was created causes the problem (specifically, an issue with code generated for Union types).

The compiler has been updated to address this problem. You can download just the updated compiler or get the latest installer which has the updated compiler and also an updated ZBasic Library that corrects an unrelated issue.

ZBasic compiler v4.3.22:
http://www.zbasic.net/download/ZBasic/4 ... 4-3-22.zip

ZBasic installer v4.3.22:
http://www.zbasic.net/download/installe ... 4-3-22.exe
- Don Kinzer
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

thanks for the update - that fixed that issue. However if I add Option RTC On

and these 2 lines:-

Code: Select all

		dim byHour as byte,byMin as byte,snSec as single
		Call GetTime(byHour,byMin,snSec)
i get back end build error reported again.

It seems to be the call to GetTime[/code]
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

FFMan wrote:It seems to be the call to GetTime[/code]
If you look at the build output, you'll see that there is a symbol __ieee754_remainder that is undefined. That symbol is supposed to be defined in libm.a supplied with the esp8266 C compiler. Why it is not there I do not know.

I created a simple implementation of that function and added it to libm.a. The updated version is in the attached .zip file. You should extract that file to the xtensa-lx106-elf/xtensa-lx106-elf/lib subdirectory of the ZBasic installation directory. You should probably rename the existing libm.a before doing so.
Attachments
libm.zip
(230.9 KiB) Downloaded 286 times
- Don Kinzer
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

thanks - that sorted it out
Post Reply