# Serial output from system firmware (read in Linux terminal)

**URL:** <https://community.particle.io/t/serial-output-from-system-firmware-read-in-linux-terminal/24184>\
**Category:** Firmware\
**Created:** [July 7, 2016, 1:16am UTC](https://community.particle.io/t/serial-output-from-system-firmware-read-in-linux-terminal/24184 "2016-07-07T01:16:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![synergylabs](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@synergylabs](https://community.particle.io/u/synergylabs)\
**Post date:** [July 7, 2016, 1:16am UTC](https://community.particle.io/t/serial-output-from-system-firmware-read-in-linux-terminal/24184/1 "2016-07-07T01:16:27Z")

</div>

Hi, I was trying to debug the particle photon system firmware but could not get the system firmware to print into the USB serial output port. I wanted print to serial (connected to my terminal as USB device) from the spark\_protocol.cpp code on message receipt from cloud. I tried to do it through 2 calls,

_serial\_dump(“MY MSG”);_  
and  
_DEBUG(“MY MSG 2”);_

But both did not print anything to serial form the system firmware. I am reading serial inputs from the USB using a Linux terminal.  
PS, messages from my applications through serial are captured well, but I dunno how to print and read messages from the system firmware using serial.

---

<div class="post-metadata">

**Author:** ![will](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/will/32/23374_2.png) [@will](https://community.particle.io/u/will)\
**Post date:** [July 13, 2016, 10:46pm UTC](https://community.particle.io/t/serial-output-from-system-firmware-read-in-linux-terminal/24184/2 "2016-07-13T22:46:24Z")

</div>

Hey there! @mdma and @BDub will be able to give you feedback on serial debugging the system firmware, and I know that the upcoming release of firmware (v060) will have a significantly revamped system debugging system. Do you think you’ve successfully opened a serial connection with the device and the messages are simply not passing through from the system thread?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 14, 2016, 6:38am UTC](https://community.particle.io/t/serial-output-from-system-firmware-read-in-linux-terminal/24184/3 "2016-07-14T06:38:05Z")

</div>

Have you read this and built the system with `DEBUG_BUILD` on?

> <https://github.com/particle-iot/firmware/blob/release/v0.5.2/docs/debugging.md>

---

<div class="post-metadata">

**Author:** ![synergylabs](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@synergylabs](https://community.particle.io/u/synergylabs)\
**Post date:** [August 19, 2016, 1:36am UTC](https://community.particle.io/t/serial-output-from-system-firmware-read-in-linux-terminal/24184/4 "2016-08-19T01:36:06Z")

</div>

Hi, can you tell me how to rebuild system modules with the DEBUG\_BUILD=y flag? I am building by running “make DEBUG\_BUILD=y” command in firmware/modules folder after a clean. This, however, does not make the system-part1.bin nor system-part2.bin, as per expected without the flag. Is there a makefile that does not build system modules when the flag is set?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [August 19, 2016, 6:41am UTC](https://community.particle.io/t/serial-output-from-system-firmware-read-in-linux-terminal/24184/5 "2016-08-19T06:41:21Z")

</div>

You need to set the target platform, otherwise you are building for Core which is always monolithic.  
And if you are building the _develop_ branch you also need to set `PARTICLE_DEVELOP=1`.
