Shop OBEX P1 Docs P2 Docs Learn Events
Catalina 3.1 - Page 2 — Parallax Forums

Catalina 3.1

2

Comments

  • richaj45richaj45 Posts: 179
    edited 2011-08-04 06:59
    jazzed wrote: »
    David's solution works nicely for Windows, Linux, and Mac OS-X.

    Is anyone using Catalina on MAX OS X?

    If so can you give me the steps used to install and run the tool?

    Thank you.
    rich
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-04 07:20
    This is brilliant. Install is a one-click exercise.

    I had a few little problems:

    1) Is it possible for the very first File/Open to default to the directory that has hello_world.c
    2) I found hello world (because I know where it is) and maybe it is worth changing those couple of lines we talked about earlier, ie int rather than void, and the return. I know those compile ok because I checked them earlier today.
    3) This is the hello world demo
    /* Traditional first C program */
    
    #include <stdio.h>
    
    void main () {
     	printf("Hello, World!\n");
    
       while (1) ; // Prop reboots on exit from main()!
    }
    

    and when I click on Tools/Download to Hub Ram, it says "Could not execute tool - see log for details"

    Just to really test this out, I deliberately have renamed the working previous versions, so this is a clean install.

    Has it not installed a component?

    Is there a setting somewhere where it needs to find the com port with a propeller attached or is this done automatically?

    Is there a setting somewhere where it decides if this is a TV or VGA version?

    And the most important question - Ross, do you ever sleep??

    This is very very close to being an extremely exciting piece of code!
  • Bill HenningBill Henning Posts: 6,445
    edited 2011-08-04 07:35
    REALLY NICE work Ross!

    It only took about a minute to download and install it; and less than that to go through the excellent wizard and build the tiny/integerlib default main code. 11.2k, still leaves 21k for code/data!

    Code:Blocks also detected my BorlandC++ installation!

    (this was on XP SP3)
    RossH wrote: »
    WE INTERRUPT THIS PROGRAM FOR A MAJOR ANNOUNCEMENT!!!

    A beta version of the Catalina "one touch" installer for Windows (Windows 6, Windows 7, 32 bit and 64 bit) has just been uploaded to SourceForge. Now you can install (or uninstall) both Catalina and Code::Blocks in a single step!

    If I'd known it was so easy, I'd have done this months ago!

    What this installer does (N.B. some of this is selectable during install, but the following list assumes you leave all the options at their default value):
    1. Installs Catalina, to whatever directory you choose (default is C:\Program Files\Catalina on 32 bit Windows, or C:\Program Files (X86)\Catalina on 64 bit Windows);
    2. Sets the permissions of that directory to disable the Microsoft "VirtualStore" nonsense (Windows 7 only);
    3. Sets the environment variable LCCDIR to that directory.
    4. Installs a shortcut on your desktop to launch the Catalina Command Line - all configured and ready to go!
    5. Installs Code::Blocks.
    6. Installs a Catalina program group, with shortcuts to both the Catalina Command Line, and Catalina CodeBlocks (and also a shortcut to Uninstall Catalina - but who'd ever want to do that?)
    7. Installs the Code::Blocks Catalina Compiler plugin, and the Code::Blocks Catalina Project Wizard, and the Code::Blocks Catalina Tools.
    After all that, you're pretty much ready to just start programming in Catalina C!

    Refer to the document in the main Catalina folder called Gettting Started with CodeBlocks - but you can now completely ignore the installation section, and start with the Using Code::Blocks section (page 11).

    Good luck!


    Now for the fine print:
    1. Please keep in mind that this is a BETA release! Let me know if you try the installer and have problems, or try it and hate it for any reason.
    2. The installer currently only installs the Catalina Code::Blocks Tools for the current user. I have yet to figure out how to install these tools for "all users" - this may need to be a manual step for any users other than the one who actually does the install (currently, this will require manual editing of each user's codeblocks\default.conf file).
    3. This installer should not interfere with any existing Catalina installation (provided you install to a different directory) apart possibly from changing the setting of the LCCDIR environment variable. However - just in case - please first back up any critical source files you wish to preserve!
    Ross.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-08-04 08:07
    Hi Ross,

    First I want to thank you for throwing yet another shiny object onto my path to Propeller Enlightenment!!! (Distraction is my middle name!)

    The Beta downloaded and installed beautifully onto a USB drive on my work computer running XP sp3 (it would be wrong to actually put it on my work computer!). Everything is on the USB drive except for the Windows "Start" folder.

    I read through the Using Code::Blocks document and followed along with the only Prop board I have with me - a Quickstart. I set it to "Demo" for Platform, assuming that was the closest. Helloworld compiled and built itself without problems.

    When I went to load it into HubRam, I got the following message in the Code::Blocks window:

    Launching tool 'Download to Hub RAM': payload.exe HelloWorld (in E:\CatalinaCode\HelloWorld\bin\Release)
    stderr> Using Propeller (version 1) on port COM10 for download
    Tool execution terminated with status 0

    It looks like everytyhing worked as expected except for my Propeller displaying a friendly greeting. I haven't read anymore to see what "stdio" is expected to be and if the platforms expect to have a TV or video display connected. I usually just talk to my Props through a serial terminal.

    I didn't see anything unusual or upsetting in the install process or in going through the Code::Blocks tutorial except for the lack of a platform profile for the QuickStart and the results of my final outcome - no friendly greeting.

    If the QuickStart (and any other non-video/non-VGA) platform has issues displaying on stdio, maybe a micro-controller style "helloworld" example would be nice - a few blinks from a selected LED just to give intial warm fuzzy feelings on any platform.

    This is a very professional package and is very impressive. Now, I need to stay on this distraction a while to see where it takes me!! Now, the search for the best LARGE memory model platform begins.....

    Code::Blocks looks very usable and friendly for us "part-time" hobbyist programmers.

    It seems with me, nothing is a destination....everything is a journey!! :lol:

    Thanks for all the hours you've put into this product and the amazing support you provide through the Forums!! :thumb::thumb:
  • potatoheadpotatohead Posts: 10,261
    edited 2011-08-04 08:12
    @Ross Brilliant!

    And since it was so easy, I withdraw my earlier recommendation. Was thinking you were on the fence for the sheer effort, and wanted to encourage you to do this because it's a seriously great value add. It's done, and you appear to have had no trouble worth worrying about. Just wanted to make my earlier statement clear.
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-04 15:12
    I installed Catalina 3.1 today using the new Windows installer and the installation went fine. However, I'm trying to use CodeBlocks and am running into trouble. I'm trying to build a project where the source files are spread across a number of directories and CodeBlocks (or maybe Catalina) seem to be having trouble finding the include files. I added the directory containing the include files to my include path using the CodeBlocks Preferences dialog but it seems to have trouble finding a header file that is in the same directory as the source file that includes it. Are there any special requirements for include paths for CodeBlocks?
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-04 19:45
    David Betz wrote: »
    I installed Catalina 3.1 today using the new Windows installer and the installation went fine. However, I'm trying to use CodeBlocks and am running into trouble. I'm trying to build a project where the source files are spread across a number of directories and CodeBlocks (or maybe Catalina) seem to be having trouble finding the include files. I added the directory containing the include files to my include path using the CodeBlocks Preferences dialog but it seems to have trouble finding a header file that is in the same directory as the source file that includes it. Are there any special requirements for include paths for CodeBlocks?

    Okay, I got this to work but I think there may be a problem with the way CodeBlocks/Catalina handle finding include files. As I understand it, files included in double quotes should be looked for first in the directory containing the file being compiled. This doesn't seem to be true of CodeBlocks/Catalina. If I have a directory structure like this:
    foo/bar/file.c
    foo/bar/file.h
    

    and in file.c I have the line:
    #include "file.h"
    

    And I try to compile file.c from the foo directory by giving a command like this:
    cc bar/file.c
    

    I don't think Catalina will find file.h in this case. I would expect the find file.h because it is in the same directory as file.c but it doesn't.

    Anyway, if I add all of my source directories to the include search path I can get my program to compile. I don't think that should be necessary though. It isn't with GCC or with Microsoft Visual C++ or Xcode on the Macintosh.
  • RossHRossH Posts: 5,462
    edited 2011-08-04 21:10
    All,

    Thanks for all the good feedback and suggestions to date. I will go through each issue over the weekend, and see which ones I can address.

    David, just a quick comment on Code::Blocks and "include" files - I don't know if this will address your specific case (I've not had time to read your post in detail) but I do remember being a bit dismayed when I first used Code::Blocks because the Code::Blocks model is not the traditional C model - the source files it is compiling often don't live where you think they live - when you add a file to a project, the source file still lives in its original location, not in the project folder. This complicates the include file processing. But there is generally a simple way to make it work, which (from memory!) I have documented with an example in the "Getting Started with Code::Blocks" tutorial guide.

    Ross.
  • RossHRossH Posts: 5,462
    edited 2011-08-05 02:26
    jazzed wrote: »
    David's solution works nicely for Windows, Linux, and Mac OS-X.

    I believe David was working on a loader. Not sure how it's going. David?

    Ross.
  • RossHRossH Posts: 5,462
    edited 2011-08-05 02:34
    richaj45 wrote: »
    Is anyone using Catalina on MAX OS X?

    If so can you give me the steps used to install and run the tool?

    Thank you.
    rich

    Sorry rich, I can't help (don't have a Mac!). However, Catalina has been built from the Linux sources on OSX. It is also worth pointing out that there is a binary release of Code::Blocks for OSX, but I would need to get the Catalina plugin compiled for OSX somehow.

    If you do get Catalina built, I'd appreciate it if you posted here whatever tricks/traps you learn.

    Ross.
  • RossHRossH Posts: 5,462
    edited 2011-08-05 03:28
    All,

    Now I've had time to read the comments about the new installer in detail, here is a consolidated response:

    Dr_A,

    This was only intended as a beta release of the installer itself. I have yet to do any work to make all the demos and utilities "buildable" from within Code::Blocks (although most of them don't actually need any special treatment). I intend to see if I can include some pre-defined Code::Blocks "projects" (e.g. for "hello world"), but that may be difficult if I have to use absolute file references because I have no control over where Catalina actually gets installed. However, if it is at all possible then I will do so - not just for "hello world", but for all the Catalina demos and utilities. And yes, I will modify the demo programs to be fully ANSI compliant.

    As for the "could not execute tool" message - that sounds like Code::Blocks can't find the executables it needs. Can you tell me where you installed Catalina? And did you allow the installer to set the LCCDIR environment variable?

    Also, can you open a Catalina Command Line window and try to execute payload from there? (any options will do - I just need to know if the executable itself exists). And yes, payload should find the propeller automatically (provided it is powered up).

    Finallly, To set TV or VGA HMI option you go to the Project->Build Options, and select the Compiler Settings tab. Then in the Categories drop down you select HMI Driver Selection. Select the one you want.

    And no, I don't seem to sleep much these days - it drives my wife crazy!

    Bill,

    Yes, Code::Blocks can detect (and use) pretty much any C compiler you have installed. I thought about disabling that - i.e. only including the Catalina-specific plugin. This would make it a bit simpler for Prop users, but it would annoy existing Code::Blocks users.

    mindrobots,

    Those messages are normal. The problem is likely to be the pin configuration on the QuickStart board. I'll investigate what they should be and maybe include that as a new platform if I need to. But if you are using a serial port, perhaps all you need to do is select the PC HMI option (see the above note for Dr_A about how to select the HMI option).

    potatohead,

    No sure what the "earlier suggestion" is you are referring to. However, since you have now withdrawn it, I probably don't need to :smile:

    David,

    The Code::Blocks option I was referring to in my earlier email is described on pages 23-25 of the document Getting Started with CodeBlocks. Does setting this option solve your problem? If not, could you zip up the original files and post them?

    So - in summary, only Dr_A seems to have had a problem that relates to the installer itself. This is a good start!

    Ross.
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-05 04:36
    RossH wrote: »
    I believe David was working on a loader. Not sure how it's going. David?

    Ross.

    I'm sorry to say that I got stalled on my plans for a Catalina loader. I've had a hard time understanding how to parse a Catalina executable to determine which code needs to be placed in each memory section. What I'd like to see is something more like a traditional executable file format where there is a header with a section table that contains file offset, load address, and length fields for each section. Also, the option of having a copy of the .data section appended to the .text section so it can be copied from flash to RAM on systems that support both.

    What I do have is a PASM packet driver that accepts packets with up to 1024 byte payloads and handles CRC checking. This speeds up downloads of xbasic and ZOG quite a bit because the CRC calculation written in Spin was very slow. Also, the 1024 byte packets help because of less waiting for ACK/NAK. I guess this packet driver could be integrated into Catalina's payload loader without having to change the executable file format.
  • RossHRossH Posts: 5,462
    edited 2011-08-05 05:47
    David Betz wrote: »
    I'm sorry to say that I got stalled on my plans for a Catalina loader. I've had a hard time understanding how to parse a Catalina executable to determine which code needs to be placed in each memory section. What I'd like to see is something more like a traditional executable file format where there is a header with a section table that contains file offset, load address, and length fields for each section. Also, the option of having a copy of the .data section appended to the .text section so it can be copied from flash to RAM on systems that support both.
    No need to apologize, David. Obviously I have not explained or documented things well enough yet (too much else to do, I'm afraid!). Catalina does have equivalents for all the things you mention - and your last point describes exactly how Catalina's Flash loader actually works. The various Catalina loaders are really quite simple - it is the need to keep the final loader small enough to fit in a single cog that messes the process up a bit.

    However, I do think that (at least in part) the problem is that you are looking for a complexity which exists in the binary formats you are used to (such as ELF or COFF), but which simply doesn't exist on the Propeller - because it is unnecessary. The Catalina binary format was originally a fairly simple extension of the Parallax binary format - with a couple of odd bits thrown in here and there to help reduce the loader code size. It is much simpler than most binary formats, since they are (by and large) designed to be used in conjunction with an operating system - but on the Propeller there usually is no operating system. Because of the Catalina binder there is also no need for any intermediate object formats, and the final binaries are not required to be relocatable. Yes, there are reasons why you might want to have these things - but (as Catalina demonstrates) it is by no means necessary to have them.

    If you thought it would be useful, I could easily write you a simple C program that "deconstructed" an arbitrary Catalina executable into its various component segments - which you could then transmit and load however you liked.
    David Betz wrote: »
    What I do have is a PASM packet driver that accepts packets with up to 1024 byte payloads and handles CRC checking. This speeds up downloads of xbasic and ZOG quite a bit because the CRC calculation written in Spin was very slow. Also, the 1024 byte packets help because of less waiting for ACK/NAK. I guess this packet driver could be integrated into Catalina's payload loader without having to change the executable file format.
    By all means send me your packet driver code and I'll see if I can use it. My own packet protocol is trivially simple, and has only a simple LRC (not a CRC) - but I don't think it is the protocol that is slowing Catalina down - it is the serial port handling. I used a serial port package I got off the net, because it happened to support both Linux and Windows. I spoke to Brad once (who also has a faster loader) and I believe he writes custom code for both platforms. I simply have to much else to do to get very enthusiastic about the idea of having to write different code on different platforms (which, if you think about it, is exactly what Catalina itself is specifically designed to avoid - i.e. standard ANSI C straight down the line - no omissions, no extensions!).

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-05 06:09
    Dr_A,

    This was only intended as a beta release of the installer itself. I have yet to do any work to make all the demos and utilities "buildable" from within Code::Blocks (although most of them don't actually need any special treatment). I intend to see if I can include some pre-defined Code::Blocks "projects" (e.g. for "hello world"), but that may be difficult if I have to use absolute file references because I have no control over where Catalina actually gets installed. However, if it is at all possible then I will do so - not just for "hello world", but for all the Catalina demos and utilities. And yes, I will modify the demo programs to be fully ANSI compliant.

    As for the "could not execute tool" message - that sounds like Code::Blocks can't find the executables it needs. Can you tell me where you installed Catalina? And did you allow the installer to set the LCCDIR environment variable?

    Also, can you open a Catalina Command Line window and try to execute payload from there? (any options will do - I just need to know if the executable itself exists). And yes, payload should find the propeller automatically (provided it is powered up).

    Finallly, To set TV or VGA HMI option you go to the Project->Build Options, and select the Compiler Settings tab. Then in the Categories drop down you select HMI Driver Selection. Select the one you want.

    And no, I don't seem to sleep much these days - it drives my wife crazy!
    because I have no control over where Catalina actually gets installed. However, if it is at all possible then I will do so

    The program appears to have installed itself in C:\Program Files\Catalina (it never asked about this) and so as such, maybe you do have some control after all?
    And did you allow the installer to set the LCCDIR environment variable?

    I'm not sure about that one - I don't recall it asking...
    Also, can you open a Catalina Command Line window and try to execute payload from there?
       ===================
       SETTING UP CATALINA
       ===================
    
    
    CATALINA_DEFINE  = [default]
    CATALINA_INCLUDE = [default]
    CATALINA_LIBRARY = [default]
    CATALINA_TARGET  = [default]
    CATALINA_LCCOPT  = [default]
    CATALINA_TEMPDIR = [default]
    LCCDIR           = "C:\Program Files\Catalina"
    
    C:\Program Files\Catalina>payload
    Catalina Payload 3.1
    usage: payload [options] propeller_file [catalina_file]
    
    options:  -? or -h  print this helpful message and exit (-v for more help)
              -a port   find propeller port automatically, starting at port
              -b baud   use specified baudrate (default is 115200)
              -c cpu    cpu destination for catalina download (default is 1)
              -d        diagnostic mode (-d again for more diagnostics)
              -e        program the EEPROM with the program loaded
              -f msec   set interfile delay in milliseconds (default is 100)
              -m max    set max_attempts (default is 5)
              -n msec   set sync timeout in milliseconds (default is 100)
              -p port   use port for downloads (just first download if -s used)
              -r msec   set reset delay in milliseconds (default is 0)
              -s port   switch to port for second and subsequent downloads
              -t msec   set read timeout in milliseconds (default is 250)
              -u msec   set reset time in milliseconds (default is 15)
              -v        verbose mode (or include port numbers in help message)
              -w        wait for a keypress between each load
              -x        do catalina download only (boot loader already loaded)
              -z        double reset
    
    C:\Program Files\Catalina>
    
    Finallly, To set TV or VGA HMI option you go to the Project->Build Options, and select the Compiler Settings tab.

    Project/Build Options appears to be grayed out.

    Is there something I didn't do right as part of the install process? I did have code::blocks already installed - should I uninstall that perhaps and reinstall the package?
  • RossHRossH Posts: 5,462
    edited 2011-08-05 18:31
    Dr_Acula wrote: »
    ...

    Project/Build Options appears to be grayed out.

    Is there something I didn't do right as part of the install process? I did have code::blocks already installed - should I uninstall that perhaps and reinstall the package?

    Hi Dr_A,

    Having Code::Blocks already installed should not interfere - I have several versions installed myself. The only possible consequence is that installing the new one may overwrite any previous configuration preferences.

    Apart from the "grayed out" bit, everything else looks ok. Odd.

    Can you please post your "project" file - it will be in the project folder you created, called something like <project_name>.cbp. It's just a text file, and not very large.

    Also, can you post a screenshot of the Project/Build Options screen you see (with the greyed out options)?

    Thanks,

    Ross.
  • RossHRossH Posts: 5,462
    edited 2011-08-05 20:15
    Dr_Acula wrote: »
    I did have code::blocks already installed - should I uninstall that perhaps and reinstall the package?

    Just noticed this bit, so I did a bit of experimenting, and managed to come up with a way to get the "Couldn't execute tool" message you saw when trying to download.

    It's a bit convoluted, but here is what I did:
    1. I already had Catalina and Code::Blocks installed, but to a location other than "C:\Program Files\Catalina" So to preserve my existing installation, I renamed my old Catalina folder to something else.
    2. I installed Catalina and Code::Blocks using the new installer, using default values for every setting (this will install to "C:\Program Files\Catalina", which is the default on 32 bit Windows).
    3. I can run the new Code::Blocks, and compile and install everything ok. Download also works.
    4. However, if I run the old Code::Blocks rather than the one I just installed, then I can open the project but I cannot build it, and when I try to download it I get the "Couldn't execute tool" message.
    Is it possible that when you tried to download, you were running your old Code::Blocks rather than the newly installed version? When you started it, did the Code::Blocks splash screen say 10.05 or svn 6282 (if the splash screen no longer appears, the same information is on the "Start Page", just under the Code::Blocks image:

    version.png


    Finally, if you are sure you are running the new Code::Blocks but you are still having problems, can you please try resetting the Code::Blocks Compiler settings to their defaults? To do this, open Code::Blocks, and from the main menu select Settings->Compiler and Debugger. In the dialog box that appears, ensure Catalina is the selected compiler, and press Reset to Defaults:

    Reset defaults.png


    When you do that, you should see a message pop up saying something like "Auto-detected Catalina in C:\Program Files\Catalina". Then try to compile and download your project again.

    Let me know if this works!

    Ross.
    1008 x 630 - 115K
    1008 x 773 - 86K
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-05 22:07
    Yes, I think that is part of the answer. I've uninstalled both codeblocks and catalina and then done a clean reinstall from scratch.

    Because this is a clean reinstall, when it lists off the compilers, the only one in the list is the Catalina compiler.

    Build and "build and run" don't do anything. Attached is a screenshot of the menu.

    Also one thing I noticed - when I run Tools/Download to Hub ram I get this
    Launching tool 'Download to Hub RAM': payload.exe  (in C:\Program Files\Catalina\bin\codeblocks)
    

    But payload is not in this directory, it is in "c:\program files\catalina\bin\"

    hth
    702 x 398 - 44K
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-05 22:12
    Addit: re your menu above in that screenshot, in the menu your default compiler is the cataina compiler. My default one is GNU GCC compiler (which I don't have). So I suspect this might be the problem - maybe you have that compiler on your computer?

    Rather than select the defaults, I'm going to try changing to Catalina and see if that works. BRB

    Addit: Yes, brilliant, selecting catalina as the default compiler works, and up comes a huge menu of options (which I must say looks far simpler and neater than my menus in the vb.net program. So I'm hooked on this new program already!!)

    Ok, to compile, do you select Build/Run Ctr-F10

    Or do you select Tools/Download to Hub ram?

    At the moment neither of these work. Build/Run does nothing, and Tools/Download to Hub ram doesn't work (and I think that is because it is pointing to the wrong directory)

    Almost there...!
  • RossHRossH Posts: 5,462
    edited 2011-08-05 22:20
    Dr_Acula wrote: »
    Yes, I think that is part of the answer. I've uninstalled both codeblocks and catalina and then done a clean reinstall from scratch.

    Because this is a clean reinstall, when it lists off the compilers, the only one in the list is the Catalina compiler.

    Build and "build and run" don't do anything. Attached is a screenshot of the menu.

    Also one thing I noticed - when I run Tools/Download to Hub ram I get this
    Launching tool 'Download to Hub RAM': payload.exe  (in C:\Program Files\Catalina\bin\codeblocks)
    

    But payload is not in this directory, it is in "c:\program files\catalina\bin\"

    hth

    Aha! Too easy! Sorry I didn't think of this before ... what you have done is open a C file, but you have not created a project to put it in. Code::Blocks only builds files in projects!.

    To get started, use the Catalina Project Wizard - from the main menu, select File->New->Project... then double click on Catalina Project (the one with the friendly Propeller icon). Enter the required details (the main thing you need to enter is a name and a directory).

    When the project has been created, open up the Sources nodes in the navigation pane and you will see it has included a default file called main.c. If you don't want to edit that one, just right click on it and select it Remove file from project. Then right click on the project node and select Add File... to add your own file (e.g. hello_world.c).

    Now you should be able to build and download the file!

    More details on all this are in the Getting Started with Code::Blocks document.

    Ross.
  • RossHRossH Posts: 5,462
    edited 2011-08-05 22:22
    Dr_Acula wrote: »
    Addit: re your menu above in that screenshot, in the menu your default compiler is the cataina compiler. My default one is GNU GCC compiler (which I don't have). So I suspect this might be the problem - maybe you have that compiler on your computer?

    You need to create a Catalina project (see previous post). That will automatically select the Catalina compiler.

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-05 22:52
    Ah now we are getting somewhere.

    When codeblocks first starts it has a tooltip - I wonder if we could put some of the above in the very first tooltip? (if you can edit them, that is)

    Ok, Build/Run does all sorts of things but doesn't download as yet. Fails with this error
    Launching tool 'Download to Hub RAM': payload.exe Test (in C:\Program Files\Catalina\demos\Test)
    stderr> Error: Unable to open file Test.binary
    Tool execution terminated with status 1
    

    test.binary does not appear to have been created when manually browsing to this directory.
  • RossHRossH Posts: 5,462
    edited 2011-08-05 23:05
    Dr_Acula wrote: »
    Ah now we are getting somewhere.

    When codeblocks first starts it has a tooltip - I wonder if we could put some of the above in the very first tooltip? (if you can edit them, that is)

    Ok, Build/Run does all sorts of things but doesn't download as yet. Fails with this error
    Launching tool 'Download to Hub RAM': payload.exe Test (in C:\Program Files\Catalina\demos\Test)
    stderr> Error: Unable to open file Test.binary
    Tool execution terminated with status 1
    
    test.binary does not appear to have been created when manually browsing to this directory.

    Okay - nearly done!

    Can you rebuild the project, and cut and paste the build log? Also, you can get more detailed build log information by selecting Settings->Compiler and Debugger... from the main menu, then select the Catalina C compiler and the Other Settings tab. Then set the settings on that page as follows:
    settings.png


    Ross.
    765 x 766 - 61K
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-06 01:13
    Not compiling at all again.

    I'm still very much feeling my way through this at the moment, but when I went into your menu above, the first thing that struck me is that the compiler has gone back to the GCC compiler (which I don't have).

    What I have done is clicked the button "Set as Default" and then closed down codeblocks and reopened it.

    I think this might be a rather important step, because it is the sort of thing you might do once, then forget you did it. The real concern is that you click this once, uninstall code::blocks but the uninstall process does not truly delete everything, then the next time you reinstall it, it remembers your default setting was catalina and then you (ie Ross) think that it always defaults to catalina, wheras me (the dummy!) does a clean install and it defaults to GCC and does not work.

    I don't know if you can automate it so that it makes catalina the default compiler as part of your nifty automated setup process?
  • RossHRossH Posts: 5,462
    edited 2011-08-06 01:23
    Dr_Acula wrote: »
    Not compiling at all again.

    I'm still very much feeling my way through this at the moment, but when I went into your menu above, the first thing that struck me is that the compiler has gone back to the GCC compiler (which I don't have).

    What I have done is clicked the button "Set as Default" and then closed down codeblocks and reopened it.

    I think this might be a rather important step, because it is the sort of thing you might do once, then forget you did it. The real concern is that you click this once, uninstall code::blocks but the uninstall process does not truly delete everything, then the next time you reinstall it, it remembers your default setting was catalina and then you (ie Ross) think that it always defaults to catalina, wheras me (the dummy!) does a clean install and it defaults to GCC and does not work.

    I don't know if you can automate it so that it makes catalina the default compiler as part of your nifty automated setup process?

    Dr_A,

    The way it is behaving is normal. You can set Catalina as the default compiler or not, as you like.

    The important thing is that the Catalina Project Wizard sets the compiler for the project to Catalina no matter what the default compiler is - so you don't normally need to worry. It is perfectly ok to have the default compiler set to something else - the only disadvantage is in things like the settings page, where you will have to explicitly select Catalina as the compiler before you can adjust its settings.

    You say it is not building again? Can you post a screen shot of the result of selecting Build->Rebuild or pressing CTRL-F11?

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-06 01:23
    A few more issues

    i can't copy the full debug log from the html viewer. A link pops up, it opens a window but you can't get the data out of that window. It appears to have run homespun in 0 minutes, 0 seconds, with 0 errors.

    Nothing running on the propeller though and it didn't download anything (download leds did not flash).

    A more confusing issue though.

    There are multiple options available and I know some of them, eg -dracblade, -tv_lores etc.

    These appear to be in two places. Firstly, there are a number of options in Project/Build Options

    But there is a rather similar list in Settings/Compiler and Debugger.

    Of concern though - I selected "TINY" in one but it is not being copied across to the other. Are these lists independent or linked? Which is the 'correct' one to change when you want to set up your custom settings?
  • RossHRossH Posts: 5,462
    edited 2011-08-06 01:46
    Dr_Acula wrote: »
    i can't copy the full debug log from the html viewer. A link pops up, it opens a window but you can't get the data out of that window. It appears to have run homespun in 0 minutes, 0 seconds, with 0 errors.
    Just select the actual text in the popup window, press CTRL+C, then CTRL+V in notepad (or straight into your post). Or you could attach the whole file (the link tells you where the file is - generally it will be in the top level project directory).

    Or you could post a screenshot.
    Dr_Acula wrote: »
    A more confusing issue though.

    There are multiple options available and I know some of them, eg -dracblade, -tv_lores etc.

    These appear to be in two places. Firstly, there are a number of options in Project/Build Options

    But there is a rather similar list in Settings/Compiler and Debugger.

    Of concern though - I selected "TINY" in one but it is not being copied across to the other. Are these lists independent or linked? Which is the 'correct' one to change when you want to set up your custom settings?
    Actually, they appear in at least three places - all perfectly normal. You can set these options as the default for ALL projects (via Settings-> Compiler and Debugger) as the settings for ALL build targets in a project, or as the settings for A SINGLE build target (the latter two via Project->Build Options). Generally, I think the default the policy is to inherit settings from all these places - but you can in fact set up your project to only use of these sets. Inherting them is generally recommended, except it means you can end up with conflicting options without realizing it.

    I'm afraid that Code::Blocks takes a few attempts to use get used to. But once you do, you will see it is perfectly logical.

    All this is explained in the document Getting Started with Code::Blocks. Perhaps it would be a good idea for you to read that (you can skip the install section, since the installer has done all that hard work for you).

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-06 02:01
    Just select the actual text in the popup window, press CTRL+C, then CTRL+V in notepad (or straight into your post). Or you could attach the whole file (the link tells you where the file is - generally it will be in the top level project directory).

    Yes, it is quite exciting really. The first window I have ever come across where ^C does not work. And I can't seem to find where it has gone either. Anyway, attached is a screenshot.

    Yes, I *know* I could read the manual, but I am trying to think like a total newbie - impatient, not willing to read any instructions, and wanting to get it running as quickly as possible. Click "download". Install it. Follow the onscreen instructions. Click on "hello world". Plug in the Prop board. Click "Run"

    I suspect there are going to be a few more steps in there, particularly given there are so many hardware options, but ideally it is fairly simple to match up your hardware with a checkbox and it autocompletes all the settings at least for a LMM "hello world" at low resolution on a display.

    From my point of view, I think there are two steps = "compiling" and "downloading". Do you think it has compiled something yet?
    1018 x 722 - 129K
  • RossHRossH Posts: 5,462
    edited 2011-08-06 02:36
    Dr_Acula wrote: »
    Yes, it is quite exciting really. The first window I have ever come across where ^C does not work. And I can't seem to find where it has gone either. Anyway, attached is a screenshot.

    Yes, I *know* I could read the manual, but I am trying to think like a total newbie - impatient, not willing to read any instructions, and wanting to get it running as quickly as possible. Click "download". Install it. Follow the onscreen instructions. Click on "hello world". Plug in the Prop board. Click "Run"

    Ok. At least there is some method in your madness ... I think ... :lol:

    The problem is obvious from the screenshot (well, it's obvious to me!). You are defining DRACBLADE three times. Homespun doesn't like that - it is throwing an error, but I am not picking that up error in Code::Blocks (you have to tell Code::Blocks how to distinguish error messages from "ordinary" build messages, and this is one I missed. I'll fix that in the final release).

    In the meantime, you have to go to each of the possible places where you may be defining DRACBLADE, and disable at least two of them. Also, if this project is one you created in the previous versions of Code::Blocks, you may have set these manually, which complicates this case a bit further. Here are all the places to look:
    1. In Settings->Compiler and Debugger. Check the Compiler Settings tab, and also the Linker Settings tab. Delete (or uncheck) any option that says DRACBLADE.
    2. In Project->Build Options with the project name (Test) selected in the left hand pane. Check the Compiler Settings tab, and also the Linker Settings tab. Delete (or uncheck) any option that says DRACBLADE.
    3. In Project->Build Options with the build target name (Release or Debug) selected in the left hand pane. Check the Compiler Settings tab, and also the Linker Settings tab. Delete (or uncheck) any option that says DRACBLADE.
    Now, decide WHERE you want to define DRACBLADE, and consistently do it there for every project - I recommend setting it only in Project->Build Options with the project name selected - not least because this is where the Catalina Project Wizard sets it.

    Then rebuild!

    Ross.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-06 05:54
    Sorry Ross, this is complicated. I'm getting there, but it is not something for a beginner.

    Ok, I've unchecked all the options. I found dracblade checked in five different places.

    I've now got every single option unchecked.

    If I do a build, it gives me an error saying "printf is undefined". I guess that makes sense because no libraries are defined now either.

    Now to put things back. This was very confusing initially but what I am guessing now is that on the left is a tree like structure. At the top of the tree is "workspace" and inside that is the project name (Test in my case) and inside that is "Sources" and inside that is "main.c"

    I've highlighted "Test" and checked just a few things in the Proejct/Build Options, namely
    "dracblade" as this is my hardware and
    "libc" as this will be needed for printf

    Now it compiles!

    Then I added in the vga driver, and recompiled, and then tried "Download to hub ram" and it works!

    *sound of champagne corks popping*

    There might be some things to tweak here for new users. It isn't that it is very hard to get right. The problem is more that there are still a few ways to get it wrong.

    Would it be possible to create some very simple projects for each hardware platform, and maybe in the startup tips or somewhere in the startup process, tell the new user to click File/Open Project with the settings done for their hardware?

    In a very simple sense, this would be a main program that prints "hello world", the standard library, the checkbox for that hardware, and the default display device?

    Should be simple... but... I have just noticed there is no File/Open Project. There is File/New Project, and there is File/Recent Projects. But File/Open opens a directory with all the files listed. What would a "project" look like - would it have a specific extension, or is it a whole directory of files?

    OR - maybe another idea. Maybe the "one click" install also opens a pdf, with lots of really simple pictures/screenshots of exactly what to do to run your first program.

    It should only be a few screen shots. New project. Select your hardware. etc.
  • RossHRossH Posts: 5,462
    edited 2011-08-06 17:27
    Dr_Acula wrote: »
    Sorry Ross, this is complicated. I'm getting there, but it is not something for a beginner.
    Fair cop - although, as I said earlier, this beta release was mainly to test the installer - and so far it has gone very well. AFAIK, no-one has reported any significant issues with the installer itself.
    Dr_Acula wrote: »
    Ok, I've unchecked all the options. I found dracblade checked in five different places.

    I've now got every single option unchecked.

    If I do a build, it gives me an error saying "printf is undefined". I guess that makes sense because no libraries are defined now either.
    Yes, I continually revisit the idea of making Catalina default to the standard C library if you don't specify any other - but the problem is that the Propeller has so little Hub RAM that if you don't have XMM you almost always have to use one of the cut-down versions of the library in any real applications.
    Dr_Acula wrote: »
    Now to put things back. This was very confusing initially but what I am guessing now is that on the left is a tree like structure. At the top of the tree is "workspace" and inside that is the project name (Test in my case) and inside that is "Sources" and inside that is "main.c"

    I've highlighted "Test" and checked just a few things in the Proejct/Build Options, namely
    "dracblade" as this is my hardware and
    "libc" as this will be needed for printf

    Now it compiles!

    Then I added in the vga driver, and recompiled, and then tried "Download to hub ram" and it works!

    *sound of champagne corks popping*
    Yay!
    Dr_Acula wrote: »
    There might be some things to tweak here for new users. It isn't that it is very hard to get right. The problem is more that there are still a few ways to get it wrong.

    Would it be possible to create some very simple projects for each hardware platform, and maybe in the startup tips or somewhere in the startup process, tell the new user to click File/Open Project with the settings done for their hardware?

    In a very simple sense, this would be a main program that prints "hello world", the standard library, the checkbox for that hardware, and the default display device?
    Yes, something this will be in the next release, which will also include the first non-beta release of the installer..
    Dr_Acula wrote: »

    Should be simple... but... I have just noticed there is no File/Open Project. There is File/New Project, and there is File/Recent Projects. But File/Open opens a directory with all the files listed. What would a "project" look like - would it have a specific extension, or is it a whole directory of files?
    There is no separate "Open Project" - you just use File->Open and select the project file - which in your case it willl be test.cdb in the project folder you created. You can also save and restore whole workspaces, containing multiple projects. That's what I intend to do for all the Catalina demos and utilities.
    Dr_Acula wrote: »

    OR - maybe another idea. Maybe the "one click" install also opens a pdf, with lots of really simple pictures/screenshots of exactly what to do to run your first program.

    It should only be a few screen shots. New project. Select your hardware. etc.

    Umm ... you mean something like the "Getting Started with CodeBlocks" document? :smile: But basically yes, I agree with you. I will see what I can do.

    Ross.
Sign In or Register to comment.