Author Topic: NewLine spaces in Build Log window  (Read 2756 times)

Offline Tim

  • Single posting newcomer
  • *
  • Posts: 8
NewLine spaces in Build Log window
« on: August 18, 2021, 03:13:48 pm »
Hi People,

When Building an ARM project with the following setting:-

Global Compiler settings/ Compiler Logging / "Full Command Line"

I see the "Build Log" window has the full command lines as expected, but
the text has no line space between each command line, making it difficult for me
to read the output. I would like to have a "NewLine" inserted before or after each
command line.

I did look at the compiler reference manual to see if their was a switch/option for a
newline but didn't notice one, So I presume it needs inserting before or after CodeBlocks
spawns the process.

Could somebody point me in the right direction to making this happen please.

I am using Windows XP.

Tim

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13439
    • Travis build status
Re: NewLine spaces in Build Log window
« Reply #1 on: August 18, 2021, 04:02:42 pm »
1. Can you show us the log?
2. Generally every command of the output is on a separate line. Isn't this the case for you?
3. Which compiler are you using?
4. Are you using the C::B build system or your project is using custom makefile?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Tim

  • Single posting newcomer
  • *
  • Posts: 8
Re: NewLine spaces in Build Log window
« Reply #2 on: August 18, 2021, 08:02:04 pm »
Hi,

Logs I see now and Logs I would like to see are below:
Yes, every command of the output is on a separate line.
I am using the C::B build system.

 


**********This is the output I get normally************

-------------- Build: Debug in Base-429-00 (compiler: GNU ARM GCC Compiler)---------------

arm-none-eabi-g++.exe  -mcpu=cortex-m4 -mthumb -g  -DDEBUG=1    -IInc -I"C:\emIDE V2.20\arm\arm-none-eabi\include"  -c c:\EM_workspace\Base-429-00\Setup\startup.S -o obj\Debug\Setup\startup.o
arm-none-eabi-gcc.exe  -mcpu=cortex-m4 -mthumb -g  -DDEBUG=1    -IInc -I"C:\emIDE V2.20\arm\arm-none-eabi\include"  -c c:\EM_workspace\Base-429-00\Src\main.c -o obj\Debug\Src\main.o
arm-none-eabi-gcc.exe  -o bin\Debug\Base-429-00.elf @obj\Debug\objects.obj  -Wl,-Map -Wl,bin\Debug\Base-429-00.elf.map -Wl,--gc-sections -n -Wl,-cref -mcpu=cortex-m4 -mthumb  -TSetup/Flash.ld 
Output size is 6.61 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
 

**********This is the output I would like to see************

-------------- Build: Debug in Base-429-00 (compiler: GNU ARM GCC Compiler)---------------

arm-none-eabi-g++.exe  -mcpu=cortex-m4 -mthumb -g  -DDEBUG=1    -IInc -I"C:\emIDE V2.20\arm\arm-none-eabi\include"  -c c:\EM_workspace\Base-429-00\Setup\startup.S -o obj\Debug\Setup\startup.o

arm-none-eabi-gcc.exe  -mcpu=cortex-m4 -mthumb -g  -DDEBUG=1    -IInc -I"C:\emIDE V2.20\arm\arm-none-eabi\include"  -c c:\EM_workspace\Base-429-00\Src\main.c -o obj\Debug\Src\main.o

arm-none-eabi-gcc.exe  -o bin\Debug\Base-429-00.elf @obj\Debug\objects.obj  -Wl,-Map -Wl,bin\Debug\Base-429-00.elf.map -Wl,--gc-sections -n -Wl,-cref -mcpu=cortex-m4 -mthumb  -TSetup/Flash.ld

Output size is 6.61 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13439
    • Travis build status
Re: NewLine spaces in Build Log window
« Reply #3 on: August 18, 2021, 08:16:25 pm »
Log it as a feature request then.
For me such log would look odd given that I've used to the normal log, but who knows it might be a good idea.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Tim

  • Single posting newcomer
  • *
  • Posts: 8
Re: NewLine spaces in Build Log window
« Reply #4 on: August 18, 2021, 10:06:13 pm »
Yes, I could Log it as a feature request, I did this with EmBitz years ago, but no
updates were released and the app wasn't open source. This time I was hoping
to try and make the change myself and use the experience as a "way in" to gain
a better understanding of the way CodeBlocks takes control of the compiling
process. Hence the request for a pointer in the right direction.  "Such as" is this
compiling process control "hard coded" in c++ or maybe controlled by an
intermediate script? And which script or c++ file to look at first ?

CodeBlocks is so large and complex from an outsiders point of view, that without a
pointer in the right direction, it's easier to give up at the first hurdle and go back to using
Eclipse, which I really don't want to do without at least "having a go" at something simple
like adding a newline in the right place.

As it stands for me, I could probably write a stand alone win32 app to generate an STM32 project,
but such a generator won't help me or others if I can't also integrate a remote server such as J-link
or Eblink into CodeBlocks. To start looking into such integration is way to complex for me to
test the water with, But  'looking' into adding a 'newline' seems about the right place to start.

'If' any code comes out of the 'looking', I would put it up on Github.

Tim


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13439
    • Travis build status
Re: NewLine spaces in Build Log window
« Reply #5 on: August 18, 2021, 11:15:10 pm »
"Such as" is this
compiling process control "hard coded" in c++ or maybe controlled by an
intermediate script? And which script or c++ file to look at first ?
Yes, it is hard-coded in the c++. Read the code in src/plugins/compilergcc/
Search for the line "m_PageIndex = msgMan->SetLog(m_pLog);" This adds the logger.
Then you can find all places which write to the logger and see what you can do.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7192
    • My Best Post
Re: NewLine spaces in Build Log window
« Reply #6 on: August 19, 2021, 01:30:28 am »
To Tim:

Can you build Code::Blocks from source either an SVN, Git, or tar file?

And, can you use an patch file to change the source code folder from above?

If yes, I might try to find where to edit the code and attach a patch file to your request on sf.net.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Tim

  • Single posting newcomer
  • *
  • Posts: 8
Re: NewLine spaces in Build Log window
« Reply #7 on: August 19, 2021, 04:35:02 pm »
@: oBFusCATed, Thanks. That's just what I was looking for.

My initial reaction to the code was trauma, followed by the wish to remove my account from
the forum, but after a few minutes It seems I might just need to lie down quietly for a while.

@: Tim S, The simple answer to your questions is no to all, however I looked
here:- https://sourceforge.net/p/codeblocks/code/12176/
and after a few minutes I think I understood the idea of  how the code changes were being
written, and in this particular case why the nullpointer alias was required.

In the first instance I will try and compile a copy of emIDEs' ver 2.20 source code.

Tim B

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13439
    • Travis build status
Re: NewLine spaces in Build Log window
« Reply #8 on: August 19, 2021, 05:30:33 pm »
My initial reaction to the code was trauma, followed by the wish to remove my account from
the forum, but after a few minutes It seems I might just need to lie down quietly for a while.
If you're an embedded dev such reaction is probably expected, but C::B in the desktop world is really small and simple project.  8) ;D
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]