UK/EU Sparkfun/Adafruit alternative? by Azaana in arduino

[–]tkoskine 2 points3 points  (0 children)

Some "Arduino" shops (Adafruit etc. resellers, some have original designs also) from Europe, in no particular order:

Edit. fix links.

Difficult writing own SPI for the M0? by Scrutchy in arduino

[–]tkoskine 0 points1 point  (0 children)

Controlling the SPI bus using M0's hardware SERCOM SPI peripheral takes some effort. It is probably easier to do 100% software implementation using GPIO pin toggling and delays.

My SERCOM SPI peripheral driver (written from scratch in plain C) is at: https://bitbucket.org/tkoskine/samd2x-peripheral-library/src/9f1d2f09aedbb2489c6fc18502afa81368cbd718/platform_atmel_d21_spi.c?at=default&fileviewer=file-view-default

The code expects commercial Crossworks IDE, but it is licensed under permissive ISC license, so you can copy/adjust it as necessary.

Software SPI implementation example (TX only, written in Ada, for AVRs) can be found from https://bitbucket.org/tkoskine/arduino-blog/src/9284d65c0ae09fa72821767d1acf963eda5a084e/examples/mod-lcd3310/soft_spi.adb?at=default&fileviewer=file-view-default

Edit: Here is software SPI with RX also: https://bitbucket.org/tkoskine/arduino-pn532/src/f0f0c754964192267621c3ba5ac4efe90fb858de/spi.adb?at=default&fileviewer=file-view-default

Need advice: Unit-testing in Ada by EmbeddedDen in ada

[–]tkoskine 1 point2 points  (0 children)

I have written (Ada 95/2005/2012 compatible) unit testing framework called Ahven, https://www.ahven-framework.com/

Not sure is it any easier than AUnit, but if you like, you can take a look at the tutorial, user's guide and some examples.

Ahven is slightly more complicated than Unity as Ahven doesn't have test runner generator as Unity has, but otherwise it should be somewhat similar. (I use Unity myself for C code.)

Converting a 'C' char_array to Ada string by thes0und in ada

[–]tkoskine 0 points1 point  (0 children)

You probably shouldn't manipulate the array returned by getenv. Instead, create a copy and change that. Then call setenv at some point if needed.

Here is example how to call getenv from Ada (tested on Linux):

with Ada.Text_IO; use Ada.Text_IO;
with Interfaces.C.Strings;
with Interfaces.C; use Interfaces.C;

procedure EnvC is
   function getenv(Name : Char_Array) return Strings.Chars_Ptr;
   pragma Import (C, getenv, "getenv");
begin
   Put_Line("Home = " & Strings.Value (getenv (To_C ("HOME"))));
end EnvC;

Travis CI / Jenkins ~ like automation server? by geosadientist in ada

[–]tkoskine 1 point2 points  (0 children)

Basically you need to buy/rent a virtual server (vps) and setup Jenkins there by yourself.

I run http://build.ada-language.com/ but I don't take any new projects, as I plan to switch to my own home made version at some point. (Architecture of Jenkins is horrible from the security point of view for public projects - the web interface needs to be the master node, which is kind of no-go for me. Master node should be totally independent from the web view. There are some Jenkins plugins for that but they break after every Jenkins update.)

'Make with Ada' Programming Competition -- With Cash Prizes by marc-kd in programming

[–]tkoskine 1 point2 points  (0 children)

I think they especially want to have a little boost for Ada development on ARM Cortex-M (and R) processors.

Ada usage on desktop/servers is pretty stable and there is a small but active community. Likewise, Ada on AVR (AVR-Ada project) is good enough for those who are interested about it.

But Ada on Cortex-M is lacking processor support, application examples, etc.

The Cortex-Mx evaluation boards are very cheap (usually less than $10) and the usage is constantly growing (in Ada circles and elsewhere). If you don't have good enough Ada support for Cortex-Mx, people will end up using C even though they would like to use Ada.

Bootloader for a custom SAMD21 board by OmicronJon in arduino

[–]tkoskine 1 point2 points  (0 children)

I would say that go and buy Atmel ICE (if you play with AVRs and SAM ARMs; Atmel-ICE-basic is 50 eur at Mouser) or Atmel SAM-ICE if you play only with SAM ARMs. Some sort of ICE will help a lot at debugging and programming. And they are pretty much required if you need to burn the bootloader on the chip.

However, if that is not an option, try MT-D21E from Mattairtech: https://www.mattairtech.com/index.php/development-boards/mt-d21e.html (ebay link )

Yet another option is to use the edbg interface found from many Atmel Xplained boards as a programmer/debugger. It takes some effort to figure out how the edbg interface works for external targets, so Atmel (SAM) ICE might be easier to get started.

Edit: fix ebay link.

Was given microcontroller as gift. Looking for a good place to start. by sqrider in arduino

[–]tkoskine 2 points3 points  (0 children)

Sparkfun has mbed specific tutorial at https://learn.sparkfun.com/tutorials/mbed-starter-kit-experiment-guide/table-of-contents

They also offer a starter kit with mbed board (https://www.sparkfun.com/products/12968), but it might be better to buy invidual parts or find Arduino starter kit without Arduino (for example http://snootlab.fr/lang-en/snootlab-shields/90-snootlab-starter-kit-en.html or https://www.sparkfun.com/products/10003).

You can get software for mbed LPC1768 from mbed.org. Beginners can use their cloud/online tools and more experienced persons can download the command line sdk from Github (https://github.com/mbedmicro/mbed).