Building in LPC2000 (LPC2134/01)

So i am way out of my understanding here, and this is a controller and environment I have never used before, however I want to build the code for a T962 reflow oven, the code is here: [GitHub - UnifiedEngineering/T-962-improvements: Improvements made to the cheap T-962 reflow oven utilizing the existing controller HW](GitHub - UnifiedEngineering/T-962-improvements: Improvements made to the cheap T-962 reflow oven utilizing the _existing_ controller HW) but I would ideally like to build an manage it in the VScode/PlatformIO environment as most everything else is in there, however much of what I have done I have started from a blank project building the correct arduino/marlin… environment.

However this new platform is totally beyond me.

I can’t find the correct environment for the LPC2000 series to even start!

Am I missing a simple trick, or it it another process I need to do to build it? if so can anyone direct me?

Indeed we have no current built-in support for an NXP LPC2000 microcontroller but we do have the general GitHub - platformio/platform-nxplpc: NXP LPC: development platform for PlatformIO platform, docs on creating custom board definitions and using custom upload programs. Let me have a play with.

Yeah I think I have it working. See GitHub - maxgerhardt/T-962-improvements: Improvements made to the cheap T-962 reflow oven utilizing the _existing_ controller HW

Basically all done per docs and some scripting. Compilation works

RAM:   [==        ]  23.1% (used 3788 bytes from 16384 bytes)
Flash: [=====     ]  52.7% (used 69096 bytes from 131072 bytes)
Building .pio\build\lpc2134_01\firmware.bin
====================== [SUCCESS] Took 3.28 seconds ======================

And uploading works with precompiled lpc21isp programs for, provided for Window and Linux. So a PlatformIO “Upload” will trigger the exact same thing as a make flash in the original repo you linked.

Uploading .pio\build\lpc2134_01\firmware.bin
Use manually specified: COM1
Firmware path: .pio\build\lpc2134_01\firmware.hex
lpc21isp_win.exe .pio\build\lpc2134_01\firmware.hex COM1 57600 11059
lpc21isp version 1.97
File .pio\build\lpc2134_01\firmware.hex:
        loaded...
Start Address = 0x000000C4
...

I don’t have that microcontroller or soldering iron to test, so that’s up to you.

1 Like

That’s awesome work, thanks.

It isn’t quite working for me, I get the following:

Executing task: C:\Users\"myusername"\.platformio\penv\Scripts\platformio.exe run <

Processing lpc2134_01 (platform: nxplpc; board: lpc2134_01)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
Creating version.c file from git describe..
TypeError: not all arguments converted during string formatting:
  File "C:\users\"myusername"\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 175:
    env.SConscript(item, exports="env")
  File "C:\Users\"myusername"\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 591:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\"myusername"\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 280:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\T962A\create_version.py", line 19:
    create_version_c()
  File "C:\T962A\create_version.py", line 16:
    print("Exception during version.c occured: " % str(exc))
=================================================================================== [FAILED] Took 0.48 seconds ===================================================================================

Not sure why as I presume these aspects would be identical

I fixed that in recent commits, do git pull again.

1 Like

Thanks, I wasn’t using GitHub linkage, just downloading a zip copy, I have now added GitHub extensions etc. pulled it down and it builds OK.

Fantastic work thank you.

I will not be able to check for a bit as I need a new USB-UART converter - all mine are hard wired to 5V but the LPC is 3V3 so I am waiting for one to turn up, possibly mid-week, if later I will be away for a week so it will go on hold unfortunately.

Thanks once again, you are a star!!!

So the converter arrived today, and it loaded perfectly!

Awesome work!

Thank you very much.

BTW, someone is struggling to build the .hex files, I had no problem but he is - GitLang - he responded to my question Re. building in VScode - issue 206 on the main GitHub page for this code, I was of little help for him!

Glad it worked, and no problem ^_^

I pushed some fixes for path escaping to my repo that should fix that issue.

I thought it was something specific to his instance as it worked in mine, glad you sorted it.

It certainly did fix it!. Thanks again Max.