Go Down

Topic: STM32, Maple and Maple mini port to IDE 1.5.x (Read 612701 times) previous topic - next topic

rogerClark

#2040
Mar 27, 2015, 10:19 am Last Edit: Mar 27, 2015, 11:10 am by rogerClark
@victor_pv

I hope you don't mind, but I'd like to re-instate the old - non-dma version of the ILI9341 lib that you zipped up, as it can co-exist with the other DMA versions, and It will be helpful for me to have a version if the lib that I can test with a DMA version of the SPI class


Also, looking at the file name Adafruit_ILI9341_STM versus the class name for Adafruit_ILI9341 , by convention the class name is the same as the file name, so I'm going to change it to match the file name, I'll also change the examples, so that they reference the correct class name.

Note the Due file / class is OK because it uses the class name ILI9341_due and the file name is ILI9341_due.cpp

Thanks

Roger


Edit

I've now made the change and pushed it to the repo.

I've updated all of the examples, and have tested most of them. Actually one or two of the examples don't currently work, because they seem to call functions not in the library, but I'm pretty sure that the problem has not been caused by this change and was probably there before the change.
(though I could be wrong ;0) )
Freelance developer and IT consultant
www.rogerclark.net

victor_pv

#2041
Mar 27, 2015, 04:41 pm Last Edit: Mar 27, 2015, 04:42 pm by victor_pv
Roger I don't mind at all.
I kept the files zipped for that purpose, in case the non-DMA version was needed again.
About the file name change, I think it should be fine, as that should affect only at the point of instantiating the class, correct? so that would involve just changing 2 lines in the sketches, not a big deal.

About the examples, the ones I tested would have my DC, RST and CS pin definitiong, that were 8 9 and 10, so any example that has those, was one I tested and worked. If it doesn't have those pins, then I did not test it.
I can have a look at the ones not working. Do they work with the non-DMA version of the library?

I think we should freeze further changes to libraries using DMA until we have the new functions in the SPI library anyway, then we can optimize using them.

Just a note, on the due one, I still don't quite understand why the original author included his own copy of some of the sdfat files, with changes in the class names and little more than that. It would make more sense to just require the sdfat libraries to be available and use them.

mrburnette

#2042
Mar 27, 2015, 04:57 pm Last Edit: Mar 28, 2015, 05:50 pm by mrburnette
Adafruit_SSD1306_STM32 library
Thanks!


I have a different OLED with same resolution: 2-color mono display

I got my OLED working this morning using Software SPI.  It's refusing to work using Hardware SPI, but I have no time today to dig into this issue... No issue with Hardware SPI and ILI9341 previously.

I also tried it on Nano328 and it worked using same pin numbers (unmod libs!):
Code: [Select]
// software SPI works on Maple Mini ARM 32-bit
  // use these settings for the OLED_Pro smart display...
  // These pin #'s are for Maple Mini/UNO/Nano/Mini328
  #define OLED_DC    6  // D/C
  #define OLED_RESET 5  // RST
  #define OLED_MOSI  4  // SDA
  #define OLED_CLK   3  // SCL
  #define OLED_CS    7  // Not Connected to OLED board
  Adafruit_SSD1306 OLED(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);



Ray
OLED on the cheap...

rogerClark

Just a note, on the due one, I still don't quite understand why the original author included his own copy of some of the sdfat files, with changes in the class names and little more than that. It would make more sense to just require the sdfat libraries to be available and use them.
Hi Victor,

OK about the Due SDFat stuff. The easiest thing is to just try deleting those files and references to them e.g. includes, and see if it still works just driving the display

I see this quite a lot, where people bundle unused stuff as part of their code, mainly because they have not had time to remove and test it after its removed (which I totally understand, being time poor myself )


Re: Renaming of the file

Its all done now. I had to change the class name in the Adarduit_ILI9341_STM.cpp .h and and update the constructor method names (2 of them) and update the examples in the Adarduit_ILI9341_STM/examples folder
But all the main examples now work fine. 

e.g the digital clock and the analog clock and the graphics test and one or two others all work fine.

However one of the examples calls init() which doesn't seem to be in either the ILI or GFX lib.  But unfortunately I didn't have time last night to work out why it was calling init() or why it was missing / which class should contain it. 
Its quite possible that some of the examples just didnt work in the first place (I also see this quite a lot with libraries, because people update the lib but don't have the time to test all the examples - especially when there are a lot of them)


I agree, there is no point in doing any more work on the ILI etc libs until the SPI DMA stuff is integrated, as we will then be able to remove the DMA stuff from the ILI libs (hopefully)


I've had a bit of a cold this week, which has prevented me from doing as much work on the STM32 stuff as I'd like to have done.

And I must admit, I've been looking at some other gadgets (Bluetooth low evergy beacons aka iBeacons), because I have some possible business opportunities based around those devices.

And I've just noticed that someone has ported the ESP8266 Wifi toolchain and made an Arduino IDE version (similar to the STM32 stuff, but it has to bundle and external compilor as the ESP8266 chipset isn't ARM)

So I'm interested in getting that to work from both a personal and also commercial perspective, as I have some possible business opportunities based around the Internet of Things (IoT)

However, it looks like the weather this weekend, is not going to be especially nice, so I will hopefully have some time to devote to all these desperate projects

Cheers

Roger
Freelance developer and IT consultant
www.rogerclark.net

victor_pv

#2044
Mar 28, 2015, 12:48 am Last Edit: Mar 28, 2015, 01:01 am by victor_pv
Roger, the init() thing is because the author of the GFX_AS library that added more fonts, for some reason renamed begin() to init(), I have no idea why... so as I used your ILI9341 driver as a base to add DMA, I decided it was better for compatibility to leave it as begin() like it use to be, and it was in your driver. I think I tested all the examples, but looks like I forgot to save some in the final folder. Changing init() for begin() should be all that's needed for those.

About the due one, is not that it left so much of the sdfat libraries that is not needed, but rather that renamed some classes, so if you have the complete sdfat library and the due one, I can only imagine a bunch of functions are going to take double the space in memory because they are in two different libraries with a different class name. Same parameters though, so to me, it would make more sense to  keep the same class name. Not a big deal, but just a possible waste of space. Anyway let's leave that aside until we have the SPI DMA functions.

EDIT: Found the ESP8266 Arduino IDE, thanks for the heads up!

The ESP is based on MIPS as far as I know.

rogerClark

Hi Victor

RE: ESP8266

http://forum.arduino.cc/index.php?topic=311117.new#new

http://www.arduinesp.com

But unfortunately its not working for me at the moment :-(

It seems to compile using the ESP8266 (I agree I think its an Extensia device which is MIPS)

However although it claims to be uploading the bin files to the device, my existing program is not actually being overwritten

I normally use a python tool to upload but the author is using a windows EXE

I'm currently just trying to see if I can get the Python uploader to upload the Arduino builds (literally at this moment in time)

So I'll post again if I get any results !


Freelance developer and IT consultant
www.rogerclark.net

rogerClark

#2046
Mar 28, 2015, 12:59 am Last Edit: Mar 28, 2015, 02:18 am by rogerClark
Victor

I'll post this to the other thread, but the issue is the exe uploader. It reports that its been uploaded when it wasnt working

I had a supply issue on 3.3V such that uploading wasn't working

But it is now

and my test is working

Victor etc

FYI.

I've just forked the git repo with the ESP8266 stuff in it, and I'm reconfiguring it so that it doesn't need to be installed into the "Program files" folder of the PC.

As far as I can tell, there is no reason it needs to be installed in the old way. I'm pretty sure I've already made the config changes necessary so that the files can go into the "user" hardware folder e.g. like the STM32 stuff ;-)
Freelance developer and IT consultant
www.rogerclark.net

mrburnette

Quote
I've just forked the git repo with the ESP8266 stuff in it, and I'm reconfiguring it so that it doesn't need to be installed into the "Program files" folder of the PC.

As far as I can tell, there is no reason it needs to be installed in the old way. I'm pretty sure I've already made the config changes necessary so that the files can go into the "user" hardware folder e.g. like the STM32 stuff ;-)
Oh, yeah!  Let us know when you have it ready.... My modules are on the bench.  Looks like the knowledge gained in the past 6 months with the STM32 stuff has wide benefits.

Ray

rogerClark

Hi Ray

I'm just pushing my modified version back to my fork of the original repo

Note. As it needs to contain the build toolchain (exe's) for the MIPS processor stuff, its quite large, I think nearly 400Mb uncompressed, but the zip to download or clone from GitHub should be smaller (around 200Mb),

I think a lot of the bloat is because all the source code to build the MIPS stuff seems to have been part of the original EXE install from that website (though none of the toolchain is in their GitHub repo)


Its currently uploading, but my network connection is very assymetric, in that I get 2M bytes per sec download at times, but my upload speed is limited to something like 50k Bytes per second, and currently I'm only getting an upload rate of 19k Bytes per sec to GitHub - but even for my end, that speed is very low so I suspect that GitHub or possibly Git is not the fastest at uploading



And...

Yes. Working on the STM32 stuff for the last 6 months, does mean that I have a pretty clear idea of how to configure for new hardware.

In this case, there are a few things that I don't fully understand the operation of, eg.. Thie "Burn bootloader"  from the menu, which seems to just upload 2  blank.bin files


I've made a minor change to Arduino.h in the guys code, to include user_interface.h, as I can't imagine anyone not needing to access the SDK functions and having to add all the extern C junk to the top of every sketch seems messy


Anyway.

I'll post again when the upload to GitHub is complete, but at the current rate its going to take at least 1/2 hour !
Freelance developer and IT consultant
www.rogerclark.net

rogerClark

#2049
Mar 28, 2015, 03:31 am Last Edit: Mar 28, 2015, 03:56 am by rogerClark
OK

Its uploaded to GitHub
https://github.com/rogerclarkmelbourne/arduinesp

However I've not had chance to download it onto another "clean" machine, in case there is something about the toolchain that needs environment variables etc


Edit

I've downloaded the repo to another machine and it seems to work fine!

enjoy ;-)
Freelance developer and IT consultant
www.rogerclark.net

mrburnette


victor_pv

Thanks, I have a couple of ESP12 with all the pins to play with :)

I also found another similar effort, https://github.com/esp8266/Arduino
Seems to be similar, not sure which one is more complete.

rogerClark

Hi Victor

Thanks

I'll download and try that one and see how it stacks up against the other one

Looking at the one I forked and modified, it looks like its based on an older version of Arduino, a bit like libmaple

e.g. Hardware Serial class is derived from the Print class rather than the Stream class


I have been messing around with the one I forked and have made some minor improvements like adding Serial.begin  which did nothing in the current version

However I've not pushed that change to the repo yet, as I was just trying to tidy up the way the setup and loop stuff is handled

I will push later
Freelance developer and IT consultant
www.rogerclark.net

rogerClark

Victor and Ray

Looking at the repo that Victor linked to, it appears to be better than the one I cloned, however I'm not sure how the actual compilor (toolchain) is installed for https://github.com/esp8266/Arduino

GitHub seems to be experiencing some issues, at least for me at the moment, where its not serving pages correctly and its also packed up half way though a download / clone

So I'm cloning again and also downloading the Windows "release" zip file to see whats in that, because I can't see the exe in the normal fileset

Freelance developer and IT consultant
www.rogerclark.net

rogerClark

Victor and Ray

OK...

I've spent some time looking at both repo's and the one that Victor found

https://github.com/esp8266/Arduino

 I believe is the better of the two

However you need to download the Windows ZIP and its a complete replacement of the whole of Arduino 1.6.1 !

I've had a quick look at doing what I did to the other repo, i.e split out the hardware files and the tools (binaries) and move them to the user hardware folder, where they belong, but its now getting on for 10pm here and things are not working and frankly not making a lot of sense :-(

So.

I'd recommend you guys not download my version at the moment and try the one that Victor found instead.

If I get time tomorrow, I will see why I can't move the toolchain binary to the tools folder, (I get an error about the compilor mssing a DLL). I suspect that there is a difference in the way the two toolchains were built.

I've tried to use the toolchain from arduinoesp with the files from https://github.com/esp8266/Arduino]https://github.com/esp8266/Arduino  however I get all sorts of compile errors, and although I've tried to update the compile flags, its not worked :-(

Its a shame, because https://github.com/esp8266/Arduino has better cores files than the one than the http://www.arduinesp.com (which I forked and modified), but  https://github.com/esp8266/Arduino uses the older ESP IOT SDK. and  https://github.com/esp8266/Arduino seems harder to move to the user's hardware folder

I suspect it will be possible to move the  https://github.com/esp8266/Arduino version to the user's hardware folder, but I may need to duplicate some general purpose gcc files that are already in the IDE
like libiconv-2.dll


So. I guess I'll see how you guys have got on when I awake bright and early tomorrow morning ;-)

Cheers

Roger

PS. I will get back to the STM32 SPI DMA tomorrow.


Freelance developer and IT consultant
www.rogerclark.net

Go Up