Dear Members, To protect the forum from spam, all new members initial posts will require approval before they are published. Please do not create a duplicate thread. If you do not see the thread then it has been queued for review.  If in any doubt, please contact us through DM Regards Decawave

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dwm_simple compilation
#1
Hi,

I have a MDEK1001 kit and I am trying to understand how to get the code examples working. I may be asking basic questions, but I am a newbee in this. I am starting with the dwm_simple example. I have followed the Firmware user guide steps and I get no error, but I don't see how the code gets running. I have introduced some marks (printf("1")Wink but I am not seeing them.

I have an open terminal with minicom but I don't see them there nor in the eclipse console. I am just seeing the normal interface with the dwm> prompt. 

I have also tried to compile and load the code with the "make compile_load" command available in the command line. Whenever I run it I don`t see the messages I try to show with printf. Where are these traces sent? 

The other question I have, this dwm_simple includes all the factory software that is loaded in a recovery process?

I guess I am missunderstanding something but I can not get much further.

Thanks
blasi, proud to be a member of Decawave Tech Forum since May 2018.
Reply
#2
Hi blasi,

Where you put the custom code?
You should put your custom code in function app_thread_entry.
Get busy living.
Reply
#3
(07-16-2018, 05:52 AM)mhc Wrote: Hi blasi,

Where you put the custom code?
You should put your custom code in function app_thread_entry.

I have tried in that function and in dwm_user_start. The problem is that I cannot see even the MSG_INIT banner (dwn-simple\n...). I am only seeing the normal prompt dwm with the standard message ("DWM1001 TWR Real Time Location System..."). 

As I said, I may be missunderstanding something, but if I compile and load the dwm-simple code I can see it is working as expected (I can disable BLE), but I cannot see the the printf messages. Where is it supposed to be sending the standrad output? to the minicom terminal?

Thanks
blasi, proud to be a member of Decawave Tech Forum since May 2018.
Reply
#4
This is normal operation.
At the beginning, I also have the same question.
But afterward, I realize that the printf message only be displayed in shell mode...

Also, the default setting of the UART is generic mode once the DWM1001 power on.
Therefore, we will not see any printf message at the beginning as they are blocked.

The only thing we can do is waiting Decawave to provide us an API that can configure the UART to shell mode at the startup.
Get busy living.
Reply
#5
(07-16-2018, 12:15 PM)mhc Wrote: This is normal operation.
At the beginning, I also have the same question.
But afterward, I realize that the printf message only be displayed in shell mode...

Also, the default setting of the UART is generic mode once the DWM1001 power on.
Therefore, we will not see any printf message at the beginning as they are blocked.

The only thing we can do is waiting Decawave to provide us an API that can configure the UART to shell mode at the startup.

I feel like I might be having a similar problem. It appears to be running, but I'm getting no output. Can you clarify what you mean by "shell mode"? Is this a view or perspective in Eclipse? I don't see such an option and Google doesn't seem to know anything about eclipse "shell mode".  Thanks.
________________________________________
— Keith Wiley
Reply
#6
(07-23-2018, 10:40 PM)kwiley Wrote:
(07-16-2018, 12:15 PM)mhc Wrote: This is normal operation.
At the beginning, I also have the same question.
But afterward, I realize that the printf message only be displayed in shell mode...

Also, the default setting of the UART is generic mode once the DWM1001 power on.
Therefore, we will not see any printf message at the beginning as they are blocked.

The only thing we can do is waiting Decawave to provide us an API that can configure the UART to shell mode at the startup.

I feel like I might be having a similar problem. It appears to be running, but I'm getting no output. Can you clarify what you mean by "shell mode"? Is this a view or perspective in Eclipse? I don't see such an option and Google doesn't seem to know anything about eclipse "shell mode".  Thanks.
Hi Kwiley,

"Shell mode" is the internal naming definition for decawave in their firmware

There are 2 UART mode defined on the DWM1001: "Generic mode" and "Shell mode".
In "Generic mode", you just can have hex code command.All the data in UART will be assumed as TLV code command.
In "Shell mode",you can have string command.All the data in UART will be assumed as as character code command.

For the details, you can refer to the DWM1001 Firmware API Guide Ch2.7.
Get busy living.
Reply
#7
(07-24-2018, 12:57 AM)mhc Wrote:
(07-23-2018, 10:40 PM)kwiley Wrote:
(07-16-2018, 12:15 PM)mhc Wrote: This is normal operation.
At the beginning, I also have the same question.
But afterward, I realize that the printf message only be displayed in shell mode...

Also, the default setting of the UART is generic mode once the DWM1001 power on.
Therefore, we will not see any printf message at the beginning as they are blocked.

The only thing we can do is waiting Decawave to provide us an API that can configure the UART to shell mode at the startup.

I feel like I might be having a similar problem. It appears to be running, but I'm getting no output. Can you clarify what you mean by "shell mode"? Is this a view or perspective in Eclipse? I don't see such an option and Google doesn't seem to know anything about eclipse "shell mode".  Thanks.
Hi Kwiley,

"Shell mode" is the internal naming definition for decawave in their firmware

There are 2 UART mode defined on the DWM1001: "Generic mode" and "Shell mode".
In "Generic mode", you just can have hex code command.All the data in UART will be assumed as TLV code command.
In "Shell mode",you can have string command.All the data in UART will be assumed as as character code command.

For the details, you can refer to the DWM1001 Firmware API Guide Ch2.7.

I'm not sure I understand your response. Since shell mode relies on the UART interface, are you saying it can't be used through the USB Segger J-link connection in conjunction with Eclipse? It isn't clear from ch 2.7 of the API guide how any of this works with Eclipse via the J-link.

Thanks.
________________________________________
— Keith Wiley
Reply
#8
Hi Kwiley,

I am also not sure what is your situation.

I refer the "Shell mode" is the UART working mode of DWM1001. 
It is not related to the Eclipse.

In the UART terminal, You need to press "Enter" 2 times, or send hex code "0x0d" 2 times in order to trigger the DWM1001 to turn it in "Shell mode".
 
Once the DWM1001 is in "shell mode", you can see the printf message.
Get busy living.
Reply
#9
(07-25-2018, 01:32 AM)mhc Wrote: Hi Kwiley,

I am also not sure what is your situation.

I refer the "Shell mode" is the UART working mode of DWM1001. 
It is not related to the Eclipse.

In the UART terminal, You need to press "Enter" 2 times, or send hex code "0x0d" 2 times in order to trigger the DWM1001 to turn it in "Shell mode".
 
Once the DWM1001 is in "shell mode", you can see the printf message.

Is the problem that I'm using a Segger j-link instead of a DWM1001-DEV board? The firmware guide describes initiating shell mode as shown in Fig. 4 but that figure utilizes the DEV board and accesses the DW through /dev/ttyACM0, which I don't see on Linux under /dev/, presumably because I'm connecting with the j-link device instead of the DEV board. Can I use UART (and shell mode and stdout debugging) with j-link, or only with the DEV board so that it will appear as ttyACM0?

Thanks.
________________________________________
— Keith Wiley
Reply
#10
Hi Kwiley,



You are using external Segger jlink device and connect to the DWM10001 DEV board?
Maybe it is the cause.


The on board Jlink also include the UART COM port. 
If you don't use the on-board jlink, you probably can't get the UART message.
Get busy living.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)