logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Hello World on DA14585 or programming the fitness band part. 1

Mlody_Zdolny 3951 3

TL;DR

  • A cheap smartband with Bluetooth, a color display, and a Dialog/Renesas DA14585 ARM Cortex-M0 SoC was opened for programming.
  • A hidden UART interface and external SPI flash let the band accept custom firmware using SmartSnippets Toolbox, Keil MDK 5.38, and SDK6.0.18.1182.1.
  • The DA14585 has 96 kB RAM and 64 kB OTP memory, and the setup used an FTDI-based USB-UART adapter plus level shifting.
  • A borrowed blinky example compiled immediately, then a custom project printed consecutive prime numbers in hex over UART.
  • Programming required a temporary development board and signal conversion, and SmartSnippets Studio was described as less mature than Keil.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Hello World on DA14585 or programming the fitness band part. 1
    Recently, I presented the interior of a cheap smartband with a BT interface, a color display and several functions typical for this segment https://www.elektroda.pl/rtvforum/topic3975641.html. Now I will describe how to start programming this system.

    The band is controlled by SoC DA14585 from Dialog (Renesas) with an ARM Cortex-M0 core. It has 96 kB of RAM and 64 kB of one-time programmable (OTP) memory. As it turned out, the system can be programmed, because it has an external FLASH memory connected via SPI. In addition, there are mini fields on the board for connecting the UART interface.

    Hello World on DA14585 or programming the fitness band part. 1

    The discovery of the UART interface enabled me to establish communication and upload my own software using the programming tools provided by Renesas. The good news is that Renesas has released versions of these tools for Windows and Linux.
    Tools and libraries useful for programming DL14585:

    SmartSnippets™ Toolbox
    Hello World on DA14585 or programming the fitness band part. 1
    A set of tools enabling communication with the DA15855. It has a GUI but can be used from the command line.

    SmartSnippets™ Studio
    Hello World on DA14585 or programming the fitness band part. 1
    Renesas proprietary IDE, still under development, still a bit underdeveloped compared to Keil. Not essential, I prefer Keil in this application.
    Both of the above tools can be downloaded from smartbond-development-tools
    Guide to installing and using SmartSnippets um-b-057

    Keil MDK 5.38
    Hello World on DA14585 or programming the fitness band part. 1
    IDE for software development. Windows only version, I installed it on wine-8.0.1.
    Download from Keil MDK , after registering and logging in.

    Software Development Kit SDK6.0.18.1182.1 for DA1453x, DA14585/6
    A set of libraries with sample programs.
    Download from SDKs after logging in

    USB-UART adapter
    Necessarily on the FTDI chip, because the SmartSnippetsToolbox programmer does not recognize others :)

    I do not describe the installation process because I did it on linux, it may be different on Windows.
    Overall, the installation went without any problems. If something was missing, I just read the message and installed it, I think there is no point in describing it. Alternatively, if anyone wants to play and encounters a problem, feel free to ask questions.

    Preparation for programming

    The board, after being removed from the headband housing, is quite bulky, the connections are made of thin wires and tapes, so it was necessary to place it on a larger "development" board.
    I used a universal board for this, on which I placed some electronics and made connections with the board removed from the band.
    It became useful during programming to lead the RESET signal outside.

    Hello World on DA14585 or programming the fitness band part. 1

    Since the USB-RS232 converter works with TTL levels, it became necessary to use a level converter in the form of a resistor divider on the Tx line and a transistor shifting the levels from 3.3 to 5V on the Rx line of the converter.
    For now, there is a wire shop, maybe I will make another more solid platform with the DA14585 board.

    Hello World on DA14585 or programming the fitness band part. 1

    First program on DA14535

    The SDK provided by Renesas includes example projects. They are in the location
    DA145xx_SDK/6.0.18.1182.1/projects/
    At the very beginning, it is worth loading and compiling one of the projects, without your own modifications, to check the operation of the environment.
    I chose the project target_apps/peripheral_examples/blinky.
    It has a structure:
    Code: Bash
    Log in, to see the code

    The structure is clear - project files in a given IDE and program sources have been separated.
    Looking at other projects, it's easy to conclude that Renesas prefers Keil over its SmartSnippets™ Studio for this SoC.
    You can see what the project looks like in another IDE by looking, for example, at the directory: projects/target_apps/ble_examples/prox_reporter/
    Code: Bash
    Log in, to see the code

    For me, the projects compiled right away, so I started creating my project based on blinky.
    I used the previously mentioned UM-B-057 guide, which describes, among others, procedure for creating a project on the basis of an existing one.
    First, I changed the name of the project and its location relative to the SDK, changing all paths in the *.uvprojx file to the correct ones. I left the *.c and *.h files so that the project structure looks like this:
    Code: Bash
    Log in, to see the code

    The program writes text to the UART, which contains consecutive prime numbers in hex format. Numbers are calculated in a very suboptimal way using modulo division.
    The duration of the loop depends on the currently counted prime number, the larger the longer it lasts.
    [syntax=c]int isPrimeNumber(int n) {
    int i;
    for(i = 2; i
    Attachments:
    • user_periph_setup.h (2.67 KB) You must be logged in to download this attachment.
    • main.c (2.12 KB) You must be logged in to download this attachment.
    • user_periph_setup.c (2.7 KB) You must be logged in to download this attachment.

    Cool? Ranking DIY
    About Author
    Mlody_Zdolny
    Level 31  
    Offline 
    Mlody_Zdolny wrote 1439 posts with rating 644, helped 109 times. Been with us since 2022 year.
  • ADVERTISEMENT
  • #2 20594014
    gulson
    System Administrator
    Posts: 29386
    Help: 148
    Rate: 6063
    Thanks for the article, lots of positives! Finally, something useful can be done with these wristbands.
    I guess everyone can't wait for the second part!
    If you would like to keep the gift, write to me with a parcel locker :)
  • ADVERTISEMENT
  • #3 20594681
    Mateusz_konstruktor
    Level 37  
    Posts: 4234
    Help: 269
    Rate: 1105
    Mlody_Zdolny wrote:
    Since the USB-RS232 converter works with TTL levels, it became necessary to use a level converter in the form of a resistor divider on the Tx line and a transistor shifting the levels from 3.3 to 5V on the Rx line of the converter.

    Meanwhile, on the manufacturer's website ftdichip.com/products/ft232rl/ we read
    Quote:
    Integrated level converter on UART and CBUS for interfacing to 5V – 1.8V Logic

    The point is that this integrated circuit has built-in pins that only require proper connection and we have support for the 3.3V standard without adding additional circuits.
  • #4 20595743
    Mlody_Zdolny
    Level 31  
    Posts: 1439
    Help: 109
    Rate: 644
    Mateusz_konstruktor wrote:
    The point is that this integrated circuit has built-in pins that only require proper connection and we have support for the 3.3V standard without adding additional circuits.

    The chip has this option, unfortunately my converter does not, because the Vccio terminal is permanently connected to +5 V.
📢 Listen (AI):

FAQ

TL;DR: With 96 kB RAM and “something useful” possible, this FAQ shows makers how to start DA14585 smartband firmware work through UART, Renesas SDK6, SmartSnippets Toolbox, and Keil MDK. It solves the first-upload and Hello World setup problem. [#20592291] Why it matters: Cheap Bluetooth fitness bands can become practical DA14585 development boards when UART, RESET, and SPI flash access are understood.

Option Role in the thread Platform note Practical verdict
SmartSnippets Toolbox Communicates with DA14585 and programs it Windows and Linux versions Needed for upload/programming
SmartSnippets Studio Renesas IDE with GUI Still under development Usable, but less preferred
Keil MDK 5.38 Firmware IDE Windows; tested under wine-8.0.1 Preferred for this project
SDK6.0.18.1182.1 Libraries and examples DA1453x and DA14585/6 Best starting point

Key insight: The breakthrough is finding UART pads on the band PCB. Once UART and RESET are available, the external SPI flash lets the DA14585 run custom firmware without relying on OTP memory.

Quick Facts

  • DA14585 uses an ARM Cortex-M0 core, 96 kB RAM, and 64 kB OTP memory in this smartband project. [#20592291]
  • The board also has external SPI flash, which made normal reprogramming practical for custom firmware. [#20592291]
  • The toolchain used SmartSnippets Toolbox, SmartSnippets Studio, Keil MDK 5.38, and SDK6.0.18.1182.1. [#20592291]
  • The author used Linux with wine-8.0.1 for Keil MDK, while Renesas tools were available for Windows and Linux. [#20592291]
  • The USB-UART electrical issue was 5 V converter logic versus a 3.3 V DA14585 board; FT232RL can support 5 V to 1.8 V logic if VCCIO is wired correctly. [#20594681]

How do you start programming a cheap smartband based on the Dialog/Renesas DA14585 SoC?

Start by exposing UART pads, RESET, and power-safe serial wiring on the smartband PCB. Then use Renesas tools and SDK examples.
  1. Mount the removed board on a larger development board.
  2. Connect UART and bring RESET outside.
  3. Compile the SDK blinky example before modifying code.
The thread used SmartSnippets Toolbox, Keil MDK 5.38, and SDK6.0.18.1182.1. [#20592291]

What is the DA14585 and what are its key memory and CPU features for smartband projects?

The DA14585 is the Bluetooth SoC controlling the smartband in this project. "DA14585 is a Dialog/Renesas SoC that controls the band, uses an ARM Cortex-M0 core, and provides 96 kB RAM plus 64 kB one-time programmable memory for embedded firmware work." The board also included external SPI flash. That extra memory made custom firmware uploading practical in the thread. [#20592291]

How can the UART pads on a DA14585 fitness band board be used to upload custom firmware?

The UART pads provide the serial communication path used by Renesas programming tools. The author found mini pads on the board, established UART communication, and uploaded custom software. The setup also brought RESET outside for reliable programming control. The board came from a cheap BT smartband with a color display. The upload process used SmartSnippets Toolbox with a USB-UART adapter. [#20592291]

Which Renesas tools are needed to program the DA14585, and what does SmartSnippets Toolbox do?

Use SmartSnippets Toolbox, SmartSnippets Studio, and the DA145xx SDK for Renesas-side DA14585 work. SmartSnippets Toolbox is the programming and communication utility in the thread. "SmartSnippets Toolbox is a Renesas toolset that communicates with DA14585-class devices, offers a GUI, and can also run from the command line for programming tasks." The author noted Windows and Linux versions. [#20592291]

What is SmartSnippets Studio and how does it compare with Keil MDK for DA14585 development?

SmartSnippets Studio is Renesas’ proprietary IDE, but the author preferred Keil MDK here. The thread describes Studio as still developed, yet underdeveloped compared with Keil. Keil MDK 5.38 served as the main firmware IDE. The author installed Keil under wine-8.0.1 on Linux. Renesas SDK projects also showed strong Keil support in their directory layout. [#20592291]

How do you install and use the DA145xx SDK 6.0.18.1182.1 examples for a first DA14585 project?

Install the SDK, open an example, and compile it without changes first. The SDK version named in the thread is SDK6.0.18.1182.1 for DA1453x and DA14585/6. Example projects sit under DA145xx_SDK/6.0.18.1182.1/projects/. The author chose target_apps/peripheral_examples/blinky. Its folders were include, Keil_5, and src. Successful compilation confirmed the toolchain before custom edits. [#20592291]

How can you create a custom Hello World project for the DA14585 based on the Renesas blinky example?

Create the Hello World project by copying blinky and fixing paths in the Keil project file. The author renamed the project and adjusted relative SDK paths inside the *.uvprojx file. The new tree kept include, Keil_5, and src. It used main.c and user_periph_setup.c. The program printed UART text containing consecutive prime numbers in hexadecimal format. [#20592291]

Why does SmartSnippets Toolbox require an FTDI-based USB-UART adapter for programming the DA14585?

The thread says SmartSnippets Toolbox recognized only FTDI-based USB-UART adapters for this programming setup. The author explicitly wrote that the adapter was necessary on an FTDI chip because the SmartSnippets Toolbox programmer did not recognize others. This is a tool compatibility constraint, not a DA14585 CPU limit. The practical choice was an FTDI USB-UART converter. [#20592291]

What is a UART interface and why is it useful when hacking or reprogramming a fitness band?

UART is the serial link that enabled custom firmware upload in this DA14585 band. "UART is a board-level serial interface that sends and receives data over TX and RX lines, letting a computer tool communicate with an embedded target during programming and debugging." In the thread, finding mini UART pads allowed communication with the SoC and software upload. [#20592291]

What is OTP memory in the DA14585, and how is it different from the external SPI flash used by the smartband?

OTP is fixed one-time programmable memory, while the external SPI flash supported practical firmware changes. "OTP memory is non-volatile chip memory that can be programmed once, making it suitable for permanent code or configuration, unlike external SPI flash that can be rewritten during development." The DA14585 had 64 kB OTP. The smartband also had SPI flash connected externally. [#20592291]

How should the RESET signal be wired out when preparing a DA14585 smartband board for programming?

Wire RESET to an accessible point on the larger development board. The author removed the smartband board from its housing and mounted it on a universal board. That made thin wires and flex connections easier to handle. Bringing RESET outside became useful during programming. The post does not define a reset circuit value, so it only documents exposing the signal. [#20592291]

What level shifting is needed between a 5 V FT232RL USB-UART adapter and a 3.3 V DA14585 board?

Use level shifting if the converter presents 5 V UART logic to a 3.3 V DA14585 board. The author used a resistor divider on the converter TX line. He also used a transistor stage to shift the DA14585-side 3.3 V signal toward the converter RX input. This was necessary because his USB-RS232 converter used TTL levels and its VCCIO was tied to 5 V. [#20592291]

How can the FT232RL VCCIO pin be used for 3.3 V UART logic, and what happens if a converter board ties VCCIO permanently to 5 V?

Connect FT232RL VCCIO correctly to get 3.3 V UART logic; a fixed 5 V VCCIO board removes that option. A commenter cited the FT232RL feature: an integrated level converter supports 5 V to 1.8 V logic. The author answered that his converter tied VCCIO permanently to +5 V. Therefore he still needed external level shifting for the 3.3 V DA14585 board. [#20595743]

What are the common problems when compiling Renesas DA14585 SDK projects in Keil MDK under Linux Wine?

The documented Linux Wine case compiled immediately, so the thread reports no specific Keil build failure. The author installed Keil MDK 5.38 on wine-8.0.1. He said installation went without problems. If something was missing, he read the message and installed the required component. The practical edge case is missing dependencies during installation, not a DA14585 SDK source error. [#20592291]

Keil MDK vs SmartSnippets Studio vs IAR or Eclipse — which IDE is most practical for DA14585 firmware development?

Keil MDK was the most practical IDE in this thread’s DA14585 workflow. The author preferred Keil over SmartSnippets Studio and noted Studio felt underdeveloped. The blinky example used Keil_5, while another SDK example showed Eclipse, IAR, Keil_5, and src. That layout showed multiple IDE options. The author inferred that Renesas favored Keil for this SoC. [#20592291]
ADVERTISEMENT