NXTerm with USB console

2022-09-27 Thread Jernej Turnsek
Hi, I have enabled nxterm functionality on my board with a 400x240 display and I am using an USB console. When starting nxterm example in nsh, I am seeing the nxterm booting and setting the display, but when it should redirect stdout to nxterm, it doesn't. I am still in USB console. Looking the co

New UNUSED macro not working

2022-09-27 Thread Jernej Turnsek
Hi, when compiling LuaJIT on NuttX with new UNUSED macro I get following error: LuaJIT/src/lj_frame.h:70:61: error: lvalue required as unary '&' operand 70 | #define setframe_gc(f, p, tp) (setgcref((f)->fr.func, (p)), UNUSED(tp)) What was the reason to change UNUSED macro from: # define UNU

Interesting problem with mm_heap_s and mm_semaphore

2022-09-27 Thread Jernej Turnsek
Hi, I am using mm_heap region from address space which starts with 0x. ITCM memory on NXP i.MX RT10xx processors has this address. in mm_heap_s structure, mm_semaphore is the first element and when initialized, it is compared to NULL, thus initialization fails. To get around this problem I

Re: Interesting problem with mm_heap_s and mm_semaphore

2022-09-27 Thread Jernej Turnsek
I guess I could move the whole region a few bytes forward. On Tue, Sep 27, 2022 at 12:57 PM Jernej Turnsek wrote: > Hi, > > I am using mm_heap region from address space which starts with 0x. > ITCM memory on NXP i.MX RT10xx processors has this address. in mm_heap_s > structure, mm_semaph

Re: New UNUSED macro not working

2022-09-27 Thread Alan C. Assis
Hi Jernej, There is a discussion about it here: https://github.com/apache/incubator-nuttx/pull/6779 The issue with previous implementation was it only worked for integers variable. BR, Alan On 9/27/22, Jernej Turnsek wrote: > Hi, > > when compiling LuaJIT on NuttX with new UNUSED macro I get

Re: NXTerm with USB console

2022-09-27 Thread Alan C. Assis
Hi Jernej, NSH used to be an Alternative Console, but I think someone removed it few months ago, probably now my video tutorial explaning show to put the NSH terminal in a matrix display will not work see: https://www.youtube.com/watch?v=4za1lhfsct8 Maybe someone who removed it could help us :-)

Re: NXTerm with USB console

2022-09-27 Thread Jernej Turnsek
Hi Alan, what do you mean about someone removing the nsh console. It is still in apps repo. Your video was actually using a different slcd console which is available for alphanumeric lcd displays. Regards, Jernej On Tue, Sep 27, 2022 at 3:05 PM Alan C. Assis wrote: > Hi Jernej, > > NSH used to

Re: New UNUSED macro not working

2022-09-27 Thread Jernej Turnsek
Hi Alan, I understand that it should support more variables, but the fact is that the code, which used to compile, doesn't anymore. Maybe others will have the same problem, when porting from Linux to NuttX? Jernej On Tue, Sep 27, 2022 at 2:55 PM Alan C. Assis wrote: > Hi Jernej, > > There is

Re: New UNUSED macro not working

2022-09-27 Thread TimH
I would think that your variable (a) does not meet the requirement of the & operator (The operand of the address-of operator can be either a function designator or an l-value that designates an object that is not a bit field and is not declared with the register storage-class specifier.) If so

Re: NXTerm with USB console

2022-09-27 Thread Alan C. Assis
I was refering to ALT CONSOLE, it could be used to any other device. Not only SLCD :-) Maybe it was removed because now there is another alternative to Alternative Console, hehehe. I need to check. On 9/27/22, Jernej Turnsek wrote: > Hi Alan, > > what do you mean about someone removing the nsh c

Re: NXTerm with USB console

2022-09-27 Thread Gregory Nutt
I wonder if this is some interaction between the USB console and NxTerm?  Both are rather special cases.  Have you tried NxTerm with a serial console.  There are quite a few examples that worked in the past: $ find boards -name defconfig | xargs grep CONFIG_NXTERM=y boards/arm/lpc17xx_40xx/open

Re: NXTerm with USB console

2022-09-27 Thread Jernej Turnsek
Hi Gregory, The problem is that I have only a USB console available at the moment and as I can see from the code it is the USB console which is calling dup2 after nxterm was already called dup2 for the stdio and stderr. I suspect this is the root cause of the problem. I would try with the serial c