Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IDE Problems Compiler problems
11-01-2016, 08:51 PM,
#31
RE: IDE Problems Compiler problems
(11-01-2016, 06:56 PM)pingotg Wrote: On Linux you'll need that LD_ thing I posted.

John

Hi john you mentioned the LD thing you posted Am i mistaken in saying that is the batch file that points to
Code:
LOCALPATH="$(dirname -- $(readlink -f -- "${0}") )"
cd $LOCALPATH

# Set LD_LIBRARY_PATH to have our libs take precedence over what may be installed
ARCH=$(arch)
case $ARCH in
   *64 )
   # catch "ia64" (Itanium) and  "x86_64"
        LD_LIBRARY_PATH=/usr/lib32:${LOCALPATH}/linux/p32/bin:/usr/lib:/usr/lib64    
     ;;
   * )
   # i386 and the rest land here.
       LD_LIBRARY_PATH=/usr/lib32:${LOCALPATH}/linux/p32/bin:/usr/lib
    ;;
esac

export LD_LIBRARY_PATH
python ./pinguino.py
where the libraries are supposed to be

If so yes I have tried this  still the same on x.4
Reply
11-01-2016, 11:55 PM, (This post was last modified: 11-01-2016, 11:59 PM by pingotg.)
#32
RE: IDE Problems Compiler problems
Heck I just use
LD_LIBRARY_PATH=`pwd`/linux/p32/bin ./pinguino.py

and it's fine. I can open files in the IDE, compile etc.

If yours isn't OK then it's a puzzle.

You can easily read the python to see what it does, and then the source/Makefile32.linux (or whatever).

John
Reply
12-01-2016, 07:16 AM, (This post was last modified: 12-01-2016, 02:06 PM by Mark2016.)
#33
RE: IDE Problems Compiler problems
Hi John
I think i have found part of the problem
Have a look at this ( bearing in mind Im a little new to Linux as well which I guess doesn't help much Got fed up with MS  so i decided months ago to change besides which I'm impressed with this  OS)




Quote:Pinguino IDE Installation Script

 Regis Blanchot - rblanchot@pinguino.cc
 Last update 16-12-2014
 ---------------------------------------------------------------
 Host is a 32-bit GNU/Linux.
 What compiler(s) do you want to install ?
 1) none of them (default)
 2) the  8-bit (PIC18F)  compiler only
 3) the 32-bit (PIC32MX) compiler only
 4) both 8- and 32-bit compilers
 >4
 Downloading packages ...
 100% [================================================]

 Installing packages ...
[sudo] password for mark:
dpkg: dependency problems prevent configuration of pinguino-ide:
 pinguino-ide depends on libusb-1.0-0 (>= 2:1.0.11-1); however:
  Version of libusb-1.0-0 on system is 2:1.0.9~rc3-2ubuntu1.
dpkg: error processing pinguino-ide (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 pinguino-ide

 100% [================================================]


After this it hangs // I have to hit the enter key to get this to exit or control C this

python: can't open file '/usr/share/pinguino-11/post_install.py': [Errno 2] No such file or directory



 Installation complete.

"Of course it isn't complete even though this reports as such terrible scripting this really misleading some of this still in part it works i guess not just fully realized  yet hmm !! "  Not to worry a miss as good as a mile as they say

Thats from the installation script  So I think something is wrong initially with the install script in that this doesn't detect which version of libusb you are using of course next question is how to do upgrade libusb 1.0.11-1

Apart from this the script then complains about the following

post_install.py missing or cant find file under /usr/share/pinguino-11/post_install.py

So I checked this to see if this was there but of course,  dead right not there  despite all Debian packages being downloaded correctly

Next what I did was go back to your original post and tried to see if any of the other suggested links might work

Nope Not a chance even worse that the  x.4  version although this must work as i see some one has been in there  withing  changes in the last 6 months and done an update

However X.3  mentioned on your links at google arch just will not even get that far even installing what might be some form of IDE  and compiler Just a real joke this one

( A month later  nearly bald not to worry perhaps one of these hair tonics might sought this out LOL )

I have to make a joke of this to cheer myself up somehow

After this I went back  to the original clone of the github version  as this IDE at least launches but obviously with the missing library error

Yes I tried your routine as well to see if I could set the library path as suggested by you

NOPE !!  Not a chance

I then went into the cloned directory which installs all files to pinguino-ide  low and behold  I did an " ls -l " and  there is the post_install.py

I  then performed a chmod on a +x  to make this executable and copied this over to the folder where reported missing

This  being
Quote:/usr/share/pinguino-11/

 I the tried the original Linux recommended installer.sh  again

 Nope !! Not Chance

Failed again cant find this file so my guess is this must overwrite the original directory

I might try change the installer script copy the reported missing file  over  haven't gone that far as yet

The post_installer.py script simply copies the source files etc to your home area

See below


Quote:WARNING:root:Copying: /home/mark/.pinguino/source/main32.c

WARNING:root:Copying: /home/mark/.pinguino/source/Makefile32.windows
WARNING:root:Copying: /home/mark/.pinguino/source/Makefile8.linux
WARNING:root:Copying: /home/mark/.pinguino/source/crt0.c
WARNING:root:Copying: /home/mark/.pinguino/source/crt0iPinguino.c
WARNING:root:Copying: /home/mark/.pinguino/source/main.c
WARNING:root:Copying: /home/mark/.pinguino/source/config.h
WARNING:root:Copying: /home/mark/.pinguino/source/Makefile32.macosx
WARNING:root:Copying: /home/mark/.pinguino/source/Makefile32.linux
WARNING:root:Copying: /home/mark/.pinguino/source/common_types.h
WARNING:root:Copying: /home/mark/.pinguino/source/crt0i.c
WARNING:root:Copying: /home/mark/.pinguino/source/crt0iz.c
WARNING:root:Copying: /home/mark/.pinguino/source/main32.cpp
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX440F256H.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/LICENSE
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX270F256B.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX220F032D.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX795F512L.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX220F032B.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX795F512H.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/processor.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX460F512L.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/32MX250F128B.o
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/usb/libadb.a
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/usb/libcdc.a
WARNING:root:Copying: /home/mark/.pinguino/source/obj/non-free/usb/libcdc220.a


There after I tried this again

Nope !! Not a chance << I'm under the impression this may have something to do with the fact that libusb is not the required version although I cant truthfully see why as yet without going through tons of source code on the python side of this to see what its doing

Even if libusb is not there This should I would have thought at the very minimum  at least compile mmay not be able to upload but you should be able to compile

Of course obviously as you can guess

No instructions

No How too or anything else on this at all even on github Very, very poor instructions , documentation

I pity anyone even trying to start with this device or compiler given the instructions that are provided Quite poor truthfully and really disappointing


This morning Ive started to go through the code although some of this I dont fully understand but I have general gist of whats going on here so Im posting this with respect to this problems to see what you think about this that is if you have any thoughts

The code below is the main code which does compiling etc

As i said if we had command line syntax here or just instructions or  how to with command line syntax how much easier  would this be to write a new IDE that works across the board rather than just this terrible mess we have here

Any way see below
Code:
#!/usr/bin/env python
#  -*- coding: UTF-8 -*-

"""-------------------------------------------------------------------------
   pinguino

   (c) 2008-2009-2010-2011 Jean-Pierre MANDON <jp.mandon@gmail.com>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
   -------------------------------------------------------------------------"""

import sys
import os
from subprocess import Popen, STDOUT
import re
import shutil
import time
import argparse
import logging

from .boards import boardlist as Boardlist
from .uploader.uploader import Uploader
from .tools import Debugger

HOME_DIR = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]


########################################################################
class PinguinoTools(object):

   #----------------------------------------------------------------------
   def __init__(self):
       # sys.stderr = debugger.Debugger("stderr")
       # sys.stdout = debugger.Debugger("stdout")
       # debugger.Debugger(sys)

       self.NoBoot = ("noboot", 0)
       self.Boot2 = ("boot2", 0x2000)
       self.Boot4 = ("boot4", 0x0C00)

       self.dict_boot = {"v2": self.Boot2,
                         "v4": self.Boot4,
                         "no": self.NoBoot,
                         }

       #self.P32_DIR = "p32"
       #self.P8_DIR = "p8"

   # RB 2015-01-27 : Still useful ? See also methods.py/set_board
   #----------------------------------------------------------------------
   def set_os_variables(self):

       #if sys.platform == 'darwin':
           #self.c8 = 'sdcc'
           #self.u32 = 'mphidflash'
           #self.make = 'make'

       if os.getenv("PINGUINO_OS_NAME") == "windows":
           self.COMPILER_8BIT = os.path.join(self.P8_BIN, "sdcc.exe")

           #self.p8 = 'picpgm.exe'
           #self.UPLOADER_32 = os.path.join(self.P32_BIN, "mphidflash.exe")

           # RB : 2014-11-14
           # Windows installer should download and install GnuWin32
           # and add path to the System Path, something like :
           # set PATH=%PATH%;C:\Program Files\GnuWin32\bin
           #self.MAKE = "make.exe"

           self.MAKE = os.path.join(self.P32_BIN, "make.exe")

       elif os.getenv("PINGUINO_OS_NAME") == "linux":
           self.COMPILER_8BIT = os.path.join(self.P8_BIN, "sdcc")
           #self.p8 = 'picpgm'
           #self.UPLOADER_32 = os.path.join(self.P32_BIN, "ubw32")
           #self.UPLOADER_32 = os.path.join(self.P32_BIN, "pic32prog")
           self.MAKE = "make"

       elif os.getenv("PINGUINO_OS_NAME") == "macosx":
           self.COMPILER_8BIT = os.path.join(self.P8_BIN, "sdcc")
           #self.p8 = 'picpgm'
           #self.UPLOADER_32 = os.path.join(self.P32_BIN, "mphidflash")
           self.MAKE = "make"


   #----------------------------------------------------------------------
   def set_board(self, board):

       self.__current_board__ = board
       #self.get_regobject_libinstructions(board.arch)


   #----------------------------------------------------------------------
   def get_board(self):

       return self.__current_board__


   #----------------------------------------------------------------------
   def get_filename(self):

       return self.__filename__


   #----------------------------------------------------------------------
   def get_hex_file(self):

       return self.__hex_file__


   #----------------------------------------------------------------------
   @Debugger.debug_method
   def verify(self, filename):

       DATA_RETURN = {}
       DATA_RETURN["compiling"] = {"c":[], "asm":[]}
       DATA_RETURN["linking"] = []
       DATA_RETURN["preprocess"] = []
       DATA_RETURN["verified"] = False

       self.__filename__ = filename

       #self.in_verify=1
       t0 = time.time()

       filename = os.path.splitext(filename)[0]
       if os.path.exists(filename + ".hex"): os.remove(filename + ".hex")
       if os.path.exists(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c")): os.remove(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"))

       cur_board = self.get_board()
       retour, error_preprocess = self.preprocess(filename)

       if not retour:
           DATA_RETURN["verified"] = False
           DATA_RETURN["preprocess"] = error_preprocess
           return DATA_RETURN


       # compilation
       if cur_board.arch == 8: MAIN_FILE="main.hex"
       else: MAIN_FILE="main32.hex"


       retour, error_compile = self.compile(filename)
       if retour != 0:
           DATA_RETURN["verified"] = False
           DATA_RETURN["compiling"] = error_compile
           return DATA_RETURN
           #self.displaymsg(_("error while compiling"),0)
           #self.displaymsg(_("check highlighted lines in your code"),0)
           #self.displaymsg(_("You can review the file stdout (F8) for more information."),0)
       else:
           retour, error_link = self.link(filename)
           if os.path.exists(os.path.join(os.path.expanduser(self.SOURCE_DIR), MAIN_FILE)) != True:
               DATA_RETURN["verified"] = False
               DATA_RETURN["linking"] = error_link
               #self.displaymsg(_("error while linking")+" "+filename+".o",0)
               #self.displaymsg(_("You can review the file stdout (F8) for more information."),0)
               return DATA_RETURN
           else:
               shutil.copy(os.path.join(os.path.expanduser(self.SOURCE_DIR), MAIN_FILE), filename+".hex")
               #self.displaymsg(_("Compilation done"),0)
               #self.displaymsg(self.__get_code_size__(filename, self.curBoard),0)
               #t = "%.1f" % ( time.time() - t0 )
               #self.displaymsg( t + " "+_("seconds process time"),0)
               os.remove(os.path.join(os.path.expanduser(self.SOURCE_DIR), MAIN_FILE))
               self.__hex_file__ = filename+".hex"

               DATA_RETURN["verified"] = True
               DATA_RETURN["time"] = "%.3f" % ( time.time() - t0 )
               DATA_RETURN["filename"] = self.get_filename()
               DATA_RETURN["hex_file"] = filename+".hex"
               DATA_RETURN["code_size"] = self.get_code_size()


               return DATA_RETURN


   #----------------------------------------------------------------------
   @Debugger.debug_method
   def __upload__(self):

       hex_file = self.get_hex_file()
       board = self.get_board()

       uploader = Uploader(hex_file, board)
       result = uploader.upload()

       """
       if board.arch == 8:
           uploader = Uploader(hex_file, board)
           result = uploader.write_hex()

       elif board.arch == 32:
           fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), 'stdout'), 'w+')

           #RB 19-06-2014 : pic32prog
           sortie=Popen([os.path.join(os.path.dirname(self.P32_BIN), self.UPLOADER_32),
                         "-w",
                         hex_file,
                         "-r",
                         "-n"],
                        stdout=fichier, stderr=STDOUT)

           #RB 19-06-2014 : ubw32/mhidflash
           sortie=Popen([os.path.join(os.path.dirname(self.P32_BIN), self.UPLOADER_32),
                         "-S", "-p", hex_file],
                        stdout=fichier, stderr=STDOUT)

           sortie.communicate()
           fichier.seek(0)
           result = fichier.readlines()
           fichier.close()
       """

       # Weed out blank lines with filter
       #result = filter(lambda line: not line.isspace(), result)
       #return result
       if result:
           return filter(lambda line: not line.isspace(), result)
       else:
           return []

   #----------------------------------------------------------------------
   @Debugger.debug_method
   def get_regobject_libinstructions(self, arch):
       """Return regobject and libinstructions for each architecture."""
       if arch == 8:
           if getattr(self, "libinstructions_8", False):
               return self.libinstructions_8
           else:
               self.libinstructions_8 = self.read_lib(8)
               return self.libinstructions_8

       elif arch == 32:
           if getattr(self, "libinstructions_32", False):
               return self.libinstructions_32
           else:
               self.libinstructions_32 = self.read_lib(32)
               return self.libinstructions_32


   #----------------------------------------------------------------------
   @Debugger.debug_method
   def read_lib(self, arch, include_default=True):
       """Load .pdl or .pdl32 files (keywords and libraries)
        trying to find PDL files to store reserved words."""

       regobject = []
       libinstructions = []

       all_pdls = self.USER_PDL

       if arch == 8:
           libext = ".pdl"
           libdir = self.P8_DIR
       else:
           libext = ".pdl32"
           libdir = self.P32_DIR

       if include_default:
           all_pdls.extend(map(lambda pdl:os.path.join(libdir, "pdl", pdl), os.listdir(os.path.join(libdir, "pdl"))))

       all_pdls = filter(lambda name:name.endswith(libext), all_pdls)


       for fichier in all_pdls:

           # check content of the PDL file
           lib_file = open(fichier, "r")
           lines = lib_file.readlines()
           lib_file.close()

           regex_pdl = "[\s]*([.\w]*)[\s]*([\w]*)[\s]*(#include[\w\s\.\<\>/]*)*(#define.*)*[\s]*"

           for line in lines:
               line = line[:line.find('//')]
               if line.isspace() or not line: continue

               reg = re.match(regex_pdl, line)
               instruction, cnvinstruction, include, define = reg.groups()
               include = "" if include is None else include
               define = "" if define is None else define
               cnvinstruction = instruction if cnvinstruction is "" else cnvinstruction

               if not instruction: continue

               # https://regex101.com/r/nH9nS9
               regex = re.compile(ur"([^.\w])(%s)([^.\w])"%re.escape(instruction), re.MULTILINE | re.DOTALL)

               libinstructions.append([instruction, cnvinstruction, include, define, regex])


       libinstructions.sort(lambda x,y: cmp(len(x[0]), len(y[0])))
       libinstructions.reverse()

       return libinstructions[:]


   #----------------------------------------------------------------------
   def remove_strings(self, content):

       strings = re.findall(r'"[^"]*"', content)
       content = re.sub(r'"[^"]*"', '"<PINGUINO_STRING>"', content)

       index = 0
       keys = {}
       for string in strings:
           content = content.replace('"<PINGUINO_STRING>"', '"<PINGUINO_STRING:%d>"' % index, 1)
           keys['"<PINGUINO_STRING:%d>"' % index] = string
           index += 1

       return content, keys


   #----------------------------------------------------------------------
   def recove_strings(self, content, keys):

       for key in keys.keys():
           content = content.replace(key, keys[key])
       return content


   #----------------------------------------------------------------------
   @Debugger.debug_method
   def preprocess(self, filename):
       """Read Pinguino File (.pde) and translate it into C language"""

       error = []
       #defineword = {}
       #index = 0

       # delete old define.h and create a new one
       if os.path.exists(os.path.join(os.path.expanduser(self.SOURCE_DIR), "define.h")):
           os.remove(os.path.join(os.path.expanduser(self.SOURCE_DIR), "define.h"))
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "define.h"), "a")
       fichier.close()

       # rename .pde in user.c
       #name = os.path.split(filename)[1]
       shutil.copy(filename + ".pde", os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"))
       #fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"), "a")
       #fichier.close()


       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"), "r")
       i=0
       defines = set()
       file_line = {}
       readlines = fichier.readlines()
       readlines = self.remove_comments(readlines)
       for line in readlines:
           if line.find("#include")!=-1 or line.find("#define")!=-1:
               line = line[:line.find('//')]   # Ignores C++ comments, fixing Issue 11
               defines.add(line+"\n")    # add to define.h
               file_line[i] = " \n"   # delete from user.c
               i += 1
           else:
               file_line[i] = line
               i += 1
       fichier.close()

       self.update_define(defines, mode="w")

       # rewrite file user.c without #include and #define
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"), "w")
       for cpt in range(i):
           fichier.write(file_line[cpt])
       fichier.close()

       # search and replace arduino keywords in file
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"), "r")
       content = fichier.read()
       content = self.remove_comments(content)
       content_nostrings, keys = self.remove_strings(content)
       #content = content.split('\n')
       nblines = 0
       libinstructions = self.get_regobject_libinstructions(self.get_board().arch)

       content_nostrings = self.replace_word(content_nostrings, libinstructions) + "\n"
       content = self.recove_strings(content_nostrings, keys)

       #for line in content:
           #if not line.isspace() and line:
               #resultline = self.replace_word(line, libinstructions) + "\n"
           #else: resultline = "\n"
           ##FIXME: error line
           ##if resultline.find("error") == 1:
               ###line = resultline
               ###print "error " + resultline
               ###self.displaymsg("error "+resultline,1)
               ##error.append(resultline)
               ##return False
           #file_line[nblines] = resultline
           #nblines += 1

       fichier.close()


       # save new tmp file
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"), "w")
       fichier.writelines(content)
       fichier.writelines("\r\n")
       fichier.close()
       #fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "user.c"), "w")
       #for i in range(0, nblines):
           #fichier.writelines(file_line[i])
       #fichier.writelines("\r\n")
       #fichier.close()

       # sort define.h
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "define.h"), "r")
       lignes = fichier.readlines()
       lignes.sort()
       fichier.close()

       # save sorted lines
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "define.h"), "w")
       fichier.writelines(lignes)
       fichier.close()

       return True, error


   #----------------------------------------------------------------------
   def update_define(self, defines, mode="a"):
       """"""
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "define.h"), mode)
       fichier.writelines(defines)
       fichier.close()


   #----------------------------------------------------------------------
   @Debugger.debug_method
   def replace_word(self, content, libinstructions=None):
       """ convert pinguino language in C language """

       if libinstructions is None:
           libinstructions = self.get_regobject_libinstructions(self.get_board().arch)

       defines = set()
       keys = {}
       index = 0

       # replace arduino/pinguino language and add #define or #include to define.h
       for instruction, cnvinstruction, include, define, regex in libinstructions:
           if re.search(regex, content):
               content = re.sub(regex, '\g<1><PINGUINO_RESERVED:%d>\g<3>' % index, content)  #safe

               keys['<PINGUINO_RESERVED:%d>' % index] = cnvinstruction
               index += 1

               defines.add(include+"\n")
               defines.add(define+"\n")


       content = self.recove_strings(content, keys)

       self.update_define(defines, mode="a")

       return content


   #----------------------------------------------------------------------
   @Debugger.debug_method
   def remove_comments(self, textinput):
       #FIXME: replace comment with white lines for debugger

       if type(textinput) == type([]):
           text = "".join(textinput)
       else:
           text = textinput

       def replacer(match):
           s = match.group(0)

           if s.startswith('/'):
               #return "" #bug in line number in error info, multiline comments
               return "" + "\n" * (s.count("\n"))

           else:
               return s

       pattern = re.compile(
           r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
           re.DOTALL | re.MULTILINE
       )
       textout = re.sub(pattern, replacer, text)

       if type(textinput) == type([]):
           textout = textout.split("\n")
           textout = map(lambda x:x+"\n", textout)

       return textout

   #----------------------------------------------------------------------
   def get_user_imports_p8(self):
       user_imports = []
       for lib_dir in self.USER_P8_LIBS:
           user_imports.append("-I" + lib_dir)
       return user_imports

   #----------------------------------------------------------------------
   def get_user_imports_p32(self):
       user_imports = []
       for lib_dir in self.USER_P32_LIBS:
           user_imports.append("-I" + lib_dir)
       return " ".join(user_imports)

   #----------------------------------------------------------------------
   @Debugger.debug_method
   def compile(self, filename):
       """ Compile.

       NB :    "--opt-code-size"   deprecated
               "--use-non-free"    implicit -I and -L options for non-free headers and libs
               "-I" + os.path.join(self.P8_DIR, '..', 'sdcc', 'include', 'pic16'),\
               "-I" + os.path.join(self.P8_DIR, '..', 'sdcc', 'non-free', 'include', 'pic16'),\
       """

       ERROR = {"c": {},
                "asm": {},}

       board = self.get_board()

       if board.arch == 32: return 0, None

       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "stdout"), "w+")

       user_imports = self.get_user_imports_p8()
       #for lib_dir in self.USER_P8_LIBS:
           #user_imports.append("-I" + lib_dir)

       if board.bldr == 'boot2':
           sortie = Popen([self.COMPILER_8BIT,
               "--verbose",\
               "-mpic16",\
               "--denable-peeps",\
               "--obanksel=9",\
               "--optimize-cmp",\
               "--optimize-df",\
               "-p" + board.proc,\
               "-D" + board.board,\
               "-D" + board.bldr,\
               "-DBOARD=\"" + board.board + "\"",\
               "-DPROC=\"" + board.proc + "\"",\
               "-DBOOT_VER=2",\
               "--use-non-free",\
               "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'core'),\
               "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'libraries'),\
               "-I" + os.path.dirname(filename),\
               "--compile-only",\
               "-o" + os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.o'),\
               os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.c')] + user_imports,\
               stdout=fichier, stderr=STDOUT)


       elif board.bldr == 'boot4':
           sortie = Popen([self.COMPILER_8BIT,
               "--verbose",\
               "-mpic16",\
               "--denable-peeps",\
               "--obanksel=9",\
               "--optimize-cmp",\
               "--optimize-df",\
               # Do not remove --ivt-loc option
               "--ivt-loc=" + str(board.memstart),\
               "-p" + board.proc,\
               "-D" + board.board,\
               "-D" + board.bldr,\
               "-DBOARD=\"" + board.board + "\"",\
               "-DPROC=\"" + board.proc + "\"",\
               "-DBOOT_VER=4",\
               "--use-non-free",\
               "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'core'),\
               "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'libraries'),\
               "-I" + os.path.dirname(filename),\
               "--compile-only",\
               os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.c'),\
               "-o" + os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.o')] + user_imports,\
               stdout=fichier, stderr=STDOUT)

       elif board.bldr == 'noboot':
           sortie = Popen([self.COMPILER_8BIT,
               "--verbose",\
               "-mpic16",\
               "--denable-peeps",\
               "--obanksel=9",\
               "--optimize-cmp",\
               "--optimize-df",\
               "-p" + board.proc,\
               "-D" + board.board,\
               "-D" + board.bldr,\
               "-DBOARD=\"" + board.board + "\"",\
               "-DPROC=\"" + board.proc + "\"",\
               "-DBOOT_VER=0",\
               "--use-non-free",\
               "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'core'),\
               "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'libraries'),\
               "-I" + os.path.dirname(filename),\
               "--compile-only",\
               os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.c'),\
               "-o" + os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.o')] + user_imports,\
               stdout=fichier, stderr=STDOUT)


       sortie.communicate()
       if sortie.poll()!=0:
           #
           # Error treatment (RB: fixed 2012-11-15)
           #

           # set the file pointer to the beginning of stdout
           fichier.seek(0)

           # read lines until 'error' or 'Error' is found
           lines = fichier.readlines()
           errors_c = []
           errors_asm = []
           for ligne in lines:
               # C errors
               error_pos = ligne.find('error')
               if (error_pos != -1):
                   if os.name == "nt": err = 2
                   else: err = 1
                   error_line_number = ligne.split(":")[err]
                   error_message = ligne.split(":")[-1]
                   if error_line_number.isdigit():
                       errors_c.append({"line_number": error_line_number,
                                        "message": error_message,})

               # ASM errors
               error_pos = ligne.find('Error')
               if (error_pos != -1):
                   # do not display error line number since they are from the ASM file
                   # display error symbol instead
                   error_symbol = ligne[ligne.find("(_") + 2 : ligne.find(").")]
                   error_message = ligne[ error_pos + 13 : ligne.find("(_") - 1]
                   errors_asm.append(error_symbol)

           ERROR["c"] = errors_c
           ERROR["asm"] = errors_asm

       fichier.close()
       return sortie.poll(), ERROR


   # ------------------------------------------------------------------------------
   def report(self, message):
       #import sys
       #reload(sys)
       #sys.stdout.write("DEBUG : " + message + "\r\n")
       logging.info(message)

   #----------------------------------------------------------------------
   @Debugger.debug_method
   def link(self, filename):
       """Link.

       NB :  "--opt-code-size"   deprecated
             "--use-non-free"    implicit -I and -L options for non-free headers and libs
                   "-I" + os.path.join(self.P8_DIR, 'sdcc', 'include', 'pic16'),\
                   "-I" + os.path.join(self.P8_DIR, 'sdcc', 'non-free', 'include', 'pic16'),\
                   "-I" + os.path.join(self.P8_DIR, 'pinguino', 'core'),\
                   "-I" + os.path.join(self.P8_DIR, 'pinguino', 'libraries'),\
                   "-L" + os.path.join(self.P8_DIR, 'sdcc', 'lib', 'pic16'),\
                   "-L" + os.path.join(self.P8_DIR, 'sdcc', 'non-free', 'lib', 'pic16'),\
       """

       error = []
       board = self.get_board()
       fichier = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "stdout"), "w+")

       user_imports = self.get_user_imports_p8()
       #for lib_dir in self.USER_P8_LIBS:
           #user_imports.append("-I" + lib_dir)

       if board.arch == 8:

           if board.bldr == 'boot2':
               sortie = Popen([self.COMPILER_8BIT,
                   "--verbose",\
                   "-mpic16",\
                   "--denable-peeps",\
                   "--obanksel=9",\
                   "--optimize-cmp",\
                   "--optimize-df",\
                   "--no-crt",\
                   "-Wl-s" + os.path.join(self.P8_DIR, 'lkr', board.bldr + '.' + board.proc + '.lkr') + ",-m",\
                   "-p" + board.proc,\
                   "-D" + board.bldr,\
                   "-D" + board.board,\
                   "-DBOARD=\"" + board.board + "\"",\
                   "-DPROC=\"" + board.proc + "\"",\
                   "-DBOOT_VER=2",\
                   "--use-non-free",\
                   "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'core'),\
                   "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'libraries'),\
                   'libio' + board.proc + '.lib',\
                   'libdev' + board.proc + '.lib',\
                   'libc18f.lib',\
                   'libm18f.lib',\
                   'libsdcc.lib',\
                   "-o" + os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.hex'),\
                   os.path.join(self.P8_DIR, 'obj', 'application_iface.o'),\
                   os.path.join(self.P8_DIR, 'obj', 'boot_iface.o'),\
                   os.path.join(self.P8_DIR, 'obj', 'usb_descriptors.o'),\
                   os.path.join(self.P8_DIR, 'obj', 'crt0ipinguino.o'),\
                   os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.o')] + user_imports,\
                   stdout=fichier, stderr=STDOUT)

           elif board.bldr == 'boot4':
               sortie = Popen([self.COMPILER_8BIT,
                   "--verbose", "-V",\
                   "-mpic16",\
                   # optimization
                   "--denable-peeps",\
                   "--obanksel=9",\
                   "--optimize-cmp",\
                   "--optimize-df",\
                   # don't want to link default crt0i.o but crt0i.c
                   "--no-crt",\
                   # move all int. vectors after bootloader code
                   "--ivt-loc=" + str(board.memstart),\
                   # link memory map
                   "-Wl-s" + os.path.join(self.P8_DIR, 'lkr', board.bldr + '.' + board.proc + '.lkr') + ",-m",\
                   "-p" + board.proc,\
                   "-D" + board.bldr,\
                   "-D" + board.board,\
                   "-DBOARD=\"" + board.board + "\"",\
                   "-DPROC=\"" + board.proc + "\"",\
                   "-DBOOT_VER=4",\
                   "--use-non-free",\
                   "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'core'),\
                   "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'libraries'),\
                   os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.o'),\
                   'libio' + board.proc + '.lib',\
                   'libdev' + board.proc + '.lib',\
                   'libc18f.lib',\
                   'libm18f.lib',\
                   # link the default run-time module (crt0i.o)
                   # except when "-no-crt" option is used
                   'libsdcc.lib',\
                   "-o" + os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.hex'),\
                   ] + user_imports,\
                   stdout=fichier, stderr=STDOUT)

           elif board.bldr == 'noboot':
               sortie = Popen([self.COMPILER_8BIT,
                   "--verbose",\
                   "-mpic16",\
                   "--denable-peeps",\
                   "--obanksel=9",\
                   "--optimize-cmp",\
                   "--optimize-df",\
                   #"--no-crt",\ we use default run-time module inside libsdcc.lib
                   "-Wl-s" + os.path.join(self.P8_DIR, 'lkr', board.proc + '_g.lkr') + ",-m",\
                   "-p" + board.proc,\
                   "-D" + board.bldr,\
                   "-D" + board.board,\
                   "-DBOARD=\"" + board.board + "\"",\
                   "-DPROC=\"" + board.proc + "\"",\
                   "-DBOOT_VER=0",\
                   "--use-non-free",\
                   "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'core'),\
                   "-I" + os.path.join(self.P8_DIR, 'include', 'pinguino', 'libraries'),\
                   'libio' + board.proc + '.lib',\
                   'libdev' + board.proc + '.lib',\
                   'libc18f.lib',\
                   'libm18f.lib',\
                   # link the default run-time module
                   'libsdcc.lib',\
                   "-o" + os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.hex'),\
                   os.path.join(os.path.expanduser(self.SOURCE_DIR), 'main.o')] + user_imports,\
                   stdout=fichier, stderr=STDOUT)

       else:#if board.arch == 32:

           makefile = os.path.join(os.path.expanduser(self.SOURCE_DIR), 'Makefile32.'+os.getenv("PINGUINO_OS_NAME"))

           user_imports32 = self.get_user_imports_p32()

           if user_imports32: _IDE_USERLIBS_ = ["_IDE_USERLIBS_=" + user_imports32]
           else: _IDE_USERLIBS_ = []

           #self.report(makefile)

           sortie = Popen([self.MAKE,
                           "--makefile=" + makefile,
                           "_IDE_PDEDIR_=" + os.path.dirname(filename),
                           "_IDE_PROC_=" + board.proc,
                           "_IDE_BOARD_=" + board.board,
                           "_IDE_BINDIR_=" + self.P32_BIN,  #default /usr/bin
                           "_IDE_P32DIR_=" + self.P32_DIR,  #default /usr/share/pinguino-11.0/p32
                           "_IDE_SRCDIR_=" + self.SOURCE_DIR,
                           "_IDE_USERHOMEDIR_=" + os.getenv("PINGUINO_USER_PATH"),  #default ~/.pinguino
                           "_IDE_OSARCH_=" + os.getenv("PINGUINO_OS_ARCH"),
                           "_IDE_HEAP_SIZE_=" + self.HEAPSIZE,
                           "_IDE_MIPS16_ENABLE_=" + self.MIPS16,
                           "_IDE_OPTIMIZATION_=" + self.OPTIMIZATION,

                        ] + _IDE_USERLIBS_,

                        stdout=fichier, stderr=STDOUT)

       sortie.communicate()

       fichier.seek(0)
       # Check if child process has terminated
       if sortie.poll() != 0:
           for ligne in fichier:
               if ligne.find("error") != -1:
                   error.append(ligne)
       fichier.close()

       if sys.platform == "win32":

           if board.board in ["PIC32_PINGUINO_220", "Pinguino32MX220", "Pinguino32MX250", "Pinguino32MX270"]:
               badrecord = ":040000059D0040001A\n"
           else:
               badrecord = ":040000059D006000FA\n"

           if os.path.exists(os.path.join(os.path.expanduser(self.SOURCE_DIR), "main32tmp.hex")):
               fichiersource = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "main32tmp.hex"), "r")
               fichierdest = open(os.path.join(os.path.expanduser(self.SOURCE_DIR), "main32.hex"), "w+")
               for line in fichiersource:
                   if line != badrecord:
                       fichierdest.writelines(line)
               fichiersource.close()
               fichierdest.close()
               os.remove(os.path.join(os.path.expanduser(self.SOURCE_DIR), "main32tmp.hex"))

       return sortie.poll(), error


   #----------------------------------------------------------------------
   def get_code_size(self):

       board = self.get_board()
       filename = self.get_hex_file()

       codesize = 0
       address_Hi = 0

       memfree = board.memend - board.memstart

       #print "%X" % board.memstart
       #print "%X" % board.memend

       fichier = open(filename, 'r')
       lines = fichier.readlines()

       for line in lines:

           byte_count = int(line[1:3], 16)
           address_Lo = int(line[3:7], 16)
           record_type= int(line[7:9], 16)

           # extended linear address record
           if record_type == 4:
               address_Hi = int(line[9:13], 16) << 16

           # code size
           if record_type == 0:

               # address calculation
               address = address_Hi + address_Lo
               #self.displaymsg(_("address = %X" % address),0)

               if (address >= board.memstart) and (address < board.memend):
                   codesize = codesize + byte_count

       fichier.close()
       return "Code size: " + str(codesize) + " / " + str(memfree) + " " + "bytes" + " (" + str(100*codesize/memfree) + "% " + "used"+ ")"


# ------------------------------------------------------------------------------
# getOptions
# ------------------------------------------------------------------------------
def getOptions():
   parser = argparse.ArgumentParser(description='*** Pinguino IDE ***')
   parser.add_argument('-v', '--version', dest='version', action='store_true', default=False, help='show Pinguino IDE version and exit')
   parser.add_argument('-a', '--author', dest='author', action='store_true', default=False, help='show authors of this Pinguino IDE version and exit')
   parser.add_argument('-f', '--filename', dest='filename', nargs=1, default=False, help='filename to process')
   parser.add_argument('-dv', '--dev', dest='dev', nargs=1, default=False, help='set developer mode')
   parser.add_argument('-ul', '--upload', dest='upload', const=True, action='store_const', default=False, help='upload code')
   parser.add_argument('-bt', '--boot', dest='bootloader', nargs=1, default=False, help='set bootloader option')

   for b in range(len(Boardlist)):
       parser.add_argument(    Boardlist[b].shortarg,
                               Boardlist[b].longarg,
                               dest='board',
                               const=b,
                               action='store_const',
                               default=False,
                               help='compile code for ' + Boardlist[b].board + ' board')
   return parser.parse_args()






So anyone open to suggestions here 


Any that might point to where this problem is  really appreciated  or those who would like to work on this to assist and make available for all


Thanks Mark2016
Reply
12-01-2016, 03:21 PM, (This post was last modified: 12-01-2016, 03:29 PM by pingotg.)
#34
RE: IDE Problems Compiler problems
Looks like I installed X4 in April 2013. I'm not sure why mine works but not yours.

You show 2014 above - so it's NOT what I installed as X4. I also did not use dpkg.

So, you might like to use svn to grab X.4 from the path(s) I posted before. No need to be root.

I look to have libusb 0.1 and 1.0 both installed (if that helps).

I will have the dev versions as I do quite a bit with tools generally, in case it matters.

(I also use FTDI stuff and lots more but I don't think that's relevant.)

I am almost sure the toolchain does not use libusb or ftdi or whatever.

However, maybe the IDE does. But that would not explain why you can't compile.

John
Reply
12-01-2016, 04:50 PM, (This post was last modified: 12-01-2016, 05:42 PM by Mark2016.)
#35
Smile  RE: IDE Problems Compiler problems
Oh hell "weep weep weep " , LOL [Image: confused.gif]

Well uhm more bad news lol I'm just roaring with laughter at this set of problems

Here are the results of trying the zip file extracted from the X.3 link you gave me
Quote:Traceback (most recent call last):

  File "./pinguino.py", line 5, in <module>
    from wxgui.pinguino import getOptions, Pinguino, setGui
  File "/home/mark/pinguinoinstall/pinguinoX.3rev399/wxgui/__init__.py", line 4, in <module>
    import check
  File "/home/mark/pinguinoinstall/pinguinoX.3rev399/wxgui/check.py", line 222, in <module>
    from editor import functionsHelp
  File "/home/mark/pinguinoinstall/pinguinoX.3rev399/wxgui/editor/__init__.py", line 10, in <module>
    from general import General
  File "/home/mark/pinguinoinstall/pinguinoX.3rev399/wxgui/editor/general.py", line 29, in <module>
    from dic import Snippet, Autocompleter
  File "/home/mark/pinguinoinstall/pinguinoX.3rev399/wxgui/editor/dic.py", line 33, in <module>
    if os.name == "posix": date = "/".join([t[3], t[1], t[5]])
IndexError: list index out of range

Uh posix what ????  I don't have posix installed  What ??
Index out of range What ????  Looks like we have an array thats not withing range on this code


All jokes aside this the best Ive seen done so far

This i would feel is why and how people are losing their rag with this because its been fiddled with and i would surmise from this, either never worked , or altered so that it would never work to ensure people who have purchased these dev boards are left at wits end 

I would even go as far to say that this is by no means the first time Ive come across this problem  surmising that part of this problem is in fact deliberate and done to deliberately incite anger also to arouse something along the lines of violent action and indeed riots

Coming from a sensible background I know when they are taking the mickey and this is a perfect example of what term taking the piss

Not what I call fair play aimed at individuals who probably haven't as much intelligence as others or whom are less knowledgeable so that unfair advantage can be taken ( pretty sick if you ask me )

Ive known people to do this before you see I call it cheating to win

Could you please John for the purpose of the dummy <<< being me  , tell me how I go about using an svn

Ive  not done that before  so could realy do with some guidance or a how to on this or a link with a how to

Cheers

Mark
Reply
12-01-2016, 09:51 PM, (This post was last modified: 12-01-2016, 10:07 PM by pingotg.)
#36
RE: IDE Problems Compiler problems
Oh, so now you've gone to X3 not X4. Confused me...

I think MacOS or who knows what reports as posix. Just ignore it.

So... X3.... looks like I got that Aug 2012.

hmm, looks like I tweaked some file(s) (aside: wonder if I did for X4?)...

Yep. Being 3+ yrs ago, I can't really say why exactly. In wxgui:
in check.py commented (with a #) lines 286-304 (from if DEV: to perror())
in version.py commented (with #) line 24 (import pysvn)
in wxgui/editor/dic.py commented lines 33-35 and added
date = "dd/mm/aaaa"
(so posix gave me grief too)

Doesn't look like I needed for X.4 any changes like the above.

Oh - I used that LD_ thing with x.3 as well.

John
Reply
12-01-2016, 10:11 PM, (This post was last modified: 12-01-2016, 10:50 PM by Mark2016.)
#37
RE: IDE Problems Compiler problems
Hi John


Quote:#1
What Ive done is iterate through all suggestions X2 , install ... UN-install , x3 install... UN-install , x4 install... UN-install

Yes  before you ask as I know this will be the next question downloaded latest wxwidgets as well  checked this fine no problems with this  and also checked python


Using following code I did this

Code:
sudo apt-get install python-pip python2.7-dev libxext-dev python-qt4 qt4-dev-tools build-essential
Then repeated the entire process under quote #1

Niche !!

Nothing The only one that works in part is X.4 but as mentioned has this problem with cant find library I if knew what library then I might be able to backtrack this



Funnily enough I had the same problems not so long ago with another compiler when changing from windows xp to windows 7 and nothing but nothing would work on this until I copied a value from  an old installation onto the new installation

I knew then something was odd about all of this

There after it worked that was with a purchased licensed with usb key package ," Proton basic" , and guessed the something was Odd

This is not the only problem I noticed either

hey did something with parallel port a while ago as well and stopped you from writing to that or using this as an external interface too that was despite many people who are not silly by any-means of the imagination who wrote a custom dll for access to that port  Very clever individuals


This story here has simply confirmed my thoughts on this plus a few other bits and pieces Ive noticed to particularly with reference to java applets being one topic and software produced currently being offered by government staff to business to create web pages etc where they don't really want you to learn to much about the inner workings of this (Drag and drop useless knowledge and teaches you nothing except use of an interface ) stifles know how and professionalism

Forced control to stem knowledge which as Ive said is quite pitiful because it prevents people from advancing and , they nicked our ideas for some home automation but they made sure we couldn't do anything  about this first (Normal dirty tricks policies )

I'm not impressed at all with this carry on neither are a few other professional companies who are worth every penny of what they do  and they are good too

In fact Id be very surprised if they have a few of them over some of this  I might just follow suite myself

The search continues  ( hence my conclusion they have done something funny here with this )  << Not  happy bunny at the moment at all with this

An entire day doing this and trying to search for answer in fact almost a month in terms of what I could now be doing for development which other companies small business are looking for  so its preventing employment as well  If PN David Cameron opens his trap this will be my answer you want people in work change your attitudes or pay for them to sit on the dole cues take your pick

This is not helping anyone at all  neither is this advancing education

All over money and power this ( Normal silly spoiled brat childish stupidity as usual )  Jumped up office worker syndrome i call it
the other issue this lends it self too is more obviously over the Internet and without your consent This then means they can change code on the fly without your knowing, which you may have paid for and is licensed to you for full use or open source which is voluntary and helps many a person in poverty traps at times

What this does is give undue control and abuse of power to others which stifle the entire industry

You them might also consider others that have been to university and whom have worked extremely hard to gain such knowledge who are now left with courses which they cant use plus left in debt plus have no work as a result of such decisions whom are now open to abuse

Not exactly a good situations is this at all

So my arguments here are actually quite valid and responsible I am at least trying to discuss this sensibly more than I can say for others whom hold responsible positions in society


Never mind we will continue regardless

Spock over and out
Reply
14-01-2016, 10:09 AM,
#38
RE: IDE Problems Compiler problems
Progress?

Seem to have ignored my post...

John
Reply
16-01-2016, 02:08 AM, (This post was last modified: 16-01-2016, 02:28 AM by Mark2016.)
#39
RE: IDE Problems Compiler problems
(14-01-2016, 10:09 AM)pingotg Wrote: Progress?

Seem to have ignored my post...

John

Who.s ignored your post tell you what im going to do here my next step will be to lodge a complaint with micro chip re this then no one will ignore this or  other posts or the company selling these boards how about that for you !!

There after ill forward a series of messages every single university both in the uk and on a international inter continental basis to all international students to advise them under no circumstances to purchase any goods bearing the name olimex or pinguino because of the extreme attitudes and lack of information Ive come across with reference to software advertised on both olimex and this site with a very strong view to taking you to court for a no functional products as advertised and which you openly market

Try me Just try your luck me Now I wouldn't betting you that you start changing that silly little opinion of your straight away
Reply
16-01-2016, 12:04 PM, (This post was last modified: 16-01-2016, 12:05 PM by pingotg.)
#40
RE: IDE Problems Compiler problems
No good deed goes unpunished. Indeed.

You got free software, free help, don't try much but moan a lot. OK, your choice.

John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)