I am working on a pet project that has both an SPI NOR flash (for bootloader) and eMMC (OS image).

For SPI NOR I will provide a small connector to interface directly into it.

Now, since I have never used eMMC in projects I do not know the best/standard approach on this.

I see two options:

  1. Write initial image before soldering eMMC. I will be using an assembly service, so I need to find one that will do this for me.
  2. Provide in-circuit interface for writing an eMMC. Perhaps something like JTAG-UART-sized pin connector which will interface into eMMC directly, so I can write it without bringing up the entire board.

Now as far as I know, in bulk manufacturing the first option is used. However, I do not know how reliable it is. If the eMMC will be heated to over 200C, wouldn't that potentially damage the data already written on it?

Also, I think that in the second approach it is easier to rescue the board if I do something wrong.

So my question is - which is the standard approach? Maybe I am missing a 3rd option?

PS: I've checked a few development boards that I have and all of them come with JTAG/UART connectors, but I actually never used them for anything other than troubleshooting boot of the board. Is it possible to write eMMC over those connectors without making a new non-standard one? How is it done usually?

  • \$\begingroup\$ I used to work for a company that mass-produced tablets for kids. We did not pre-program NAND flash memory prior to soldering. We programmed it afterwards as part of the manufacturing process. In some cases, the chip we used had mask rom boot up code that allowed the device to enumerate over USB, and vendor supplied instructions how to program it via USB. This is a key part of the overall system architecture. The EMMC vendor should be able to advise you if pre-programming is allowed (I believe it usually is). \$\endgroup\$
    – user57037
    Jan 8, 2018 at 8:43
  • \$\begingroup\$ In this case the bootloader itself will be in SPI-NOR, so I theoretically could load into bootloader interface and have it pre-programmed to check if USB contains a device with usable image on it -- copy that image onto eMMC, which might work (again - in theory), the problem is that I will use U-boot for bootloader, and therefore I will need to add some of dd functionality to it (it already has the rest of what would be needed for that), but that is not an easy task for a pet project :( \$\endgroup\$ Jan 8, 2018 at 8:56
  • \$\begingroup\$ @mkeith actually just checked the bubt (tool that comes with u-boot) and apparently it can write to nand as well, I might give that a shot with some dev boards I have. I suggest you maybe can post your comment as an answer and if my tests work I will take that one ;) \$\endgroup\$ Jan 8, 2018 at 9:05
  • \$\begingroup\$ @AlexKey look at the mmc command in u-boot, this should allow you to write. To load the image from a USB key you can use fatload. Alternative: To load it from network, use the tftp command. (u-boot tends to support USB-Ethernet adapters if you don't have Ethernet on board.) Also, if it's a pet project and you don't want to spend lots of time, check what the u-boot from the CPU vendor already supports. \$\endgroup\$
    – Manu3l0us
    Jan 8, 2018 at 10:18
  • \$\begingroup\$ @Manu3l0us thanks. I’ve actually done rather extensive scripting for u-boot in the past, so that should be no problem, just need to figure out whether that will work properly, which I can test using dev boards I have. Can simply run script on boot that will check if usb is present and if it has appropriately named image, then it can just write it to eMMC using bubt. mmc command does different thing. It operates mmc device as block device. It won’t write to it though. But yes, now I think it should be doable with u-boot without even any modifications. \$\endgroup\$ Jan 8, 2018 at 10:22

1 Answer 1


For the prototype, you could always use a socket, so you can evaluate different manufacturers, types, sizes, etc. You can program the chips by using a SD-eMMC adapter which contains also a socket. I got one of those from Kingston for free once when I ordered some eMMC samples.

For a small pet project though I wouldn't bother pre-programming. Just bring up the bootloader and program it from there. That's what I have done successfully in a lot of projects, sometimes by first network-booting Linux and writing it from there. But that also depends a bit on CPU and interfaces of your system.

Concerning In-circuit-programming, I never tried this for eMMC.

Concerning UART and JTAG: You can always load the image to program into RAM via JTAG or download it over UART if supported by the bootloader. But this is rather slow...

  • \$\begingroup\$ Thank you for your answer, could you please share link or picture of that socket you mentioned? To be honest I am somewhat reluctant to put a bulky socket on to the PCB (those that I've seen are pretty big), specially considering I am using external help to get the PCB layout and that costs me money, if I want to produce those in bulk I would need to redo the PCB layout to remove bulky socket and make final PCB as small as possible, for which i would need to pay extra. So I is why I am considering in-circuit interface perhaps. But is there any standard interfaces for that? I could not find any \$\endgroup\$ Jan 8, 2018 at 8:46
  • \$\begingroup\$ If your target is to have a board which is as small as possible, then the socket is certainly not ideal. SD card adapter with socket \$\endgroup\$
    – Manu3l0us
    Jan 8, 2018 at 9:18
  • \$\begingroup\$ Concerning the in-circuit-interface. This can probably be done by adding test points, but you have to take care that the processor pins connected are High-Z and that you are not creating stubs. If you're PCB designer is worth the money, he will know... \$\endgroup\$
    – Manu3l0us
    Jan 8, 2018 at 9:21
  • \$\begingroup\$ right, that’s the ones I’ve seen before. Pretty bulky I would say. \$\endgroup\$ Jan 8, 2018 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.